Loading ...
Sorry, an error occurred while loading the content.
 

GEOSTATS: SUM: convert ai-grid for gslib

Expand Messages
  • s1460
    Dear listers, thank you a lot for all the anwers. I will post the question first and than the answers. Thank´s again for yout time. Sincerely Dirk Q: Dear
    Message 1 of 1 , Jun 22, 2000
      Dear listers,
      thank you a lot for all the anwers.
      I will post the question first and than the answers.
      Thank´s again for yout time.
      Sincerely
      Dirk
       
      Q:
      Dear listers,
      I´am having a little problem in getting gslib to read AI ascii-grids
      (x,y,value). Does somebody know how to convert  AI ascii-grids in
      "simplyfied Geo-EAS-format", so that gslib will read my files?
      I appreciate the tinyest idea that could help me.
      Thanks for your time.
      Sincerely,
      Dirk
       
      A:
       
      Hi,
      Geo-eas file format doesn't have any info about grids. So you need to ignore the x,y staff in the converted file(geo-eas). But, the grid info will come in when you use the the programs. A typical geo-eas file is as follows:
       
      title
      1         // How many data columes? for your case=1
      data colume titles     // one each line, for your case, only one line
      data1
      data2
      ...
      datai
       
      Please remember that x cycles fastese, then y then z.
       
      Have fun!
       
      Yours,
      Bujin Wang
       
      -------------------------------------------
       
      Dirk,

      I recently wrote a short FORTRAN program to convert the ASCII data from
      ARC/INFO's GRID into x-y coordinates.  I am attaching the text version of
      that code here.  The output is comma delimited, and with no header.  It
      would be easy for you to delimit it in any way you want by changing FORMAT
      statement 7.  Alternatively, you could import the output file into Excel
      and then export it in any form you like.  You will still have to put a
      Geo-EAS header on the file.

      You may notice that the program doesn't deal with the cell size elegantly,
      but the program works nonetheless.  (I am not experienced enough with
      FORTRAN to have it figure out if ARC printed a decimal point or not, so I
      simply ask the user).  I hope that the code has enough documentation so
      that you understand what's going on.

      The values I was extracting from GRID are integer values, so I wrote the
      program to read them as such.  If you are instead extracting values with
      decimals from GRID, you will need to change the program to read the values
      as REAL or DOUBLE PRECISION.

      Please let me know if you have any problems or questions.

      -- Mike
      -----------------------------------------------------------------------------

      Michael Gaud
      Department of Earth and Planetary Sciences
      University of New Mexico
      Albuquerque, NM  87131
      505-277-2307 (office)
      505-277-8843 (fax)
       
      ------------------------------------------
       
      Hello,

      As long as you have the appropriate header GSLIB should have no trouble
      with your data. For example:

      Filename
      3
      x
      y
      z
      123.2 234.1 231.2

      and so on. It won't like it if the header is missing. I hope this helps.

      Best regards,

      Chris Lloyd

      ---------------------------------------
       
       
    Your message has been successfully submitted and would be delivered to recipients shortly.