Jump to content

 
Photo

Matlab (.dat) to ArcGIS

- - - - -

  • Please log in to reply
2 replies to this topic

#1
NeverEasy

NeverEasy

    Contributor

  • Validated Member
  • PipPip
  • 28 posts
  • Finland

Hello!

I have a .dat file made with Matlab that I want to import into ArcGIS. I have tried using the suggestions given in this thread: http://www.cartotalk...?showtopic=3893 but none of them worked. I have attached a picture that shows what the .dat file looks like when opened with notepad. I don't know anything about Matlab, but I guess it should be a grid. All tips are welcome!

Thanks!

Attached Files



#2
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,303 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Hi, It will take some effort to hammer that in shape. If it is a grid (rather than points) you need to know the columns and rows, and you can add that as a header - the spec is here: http://en.wikipedia.org/wiki/Esri_grid.

Next step is to fix the numbers so that the figures are per rows/columns. If the grid has e.g. 200 columns, then 200 figures should be on the first row etc.

You may be able to do that in Access or Excel, but it wouldn't be too hard to prepare a python script too that reformats the file.

A different approach would be to format this to a text file with points (e.g. csv or even excel/access). Then you need to know the coords for each grid cell and calculate that in a separate column for the output: x,y,value - in ArcGIS you would then bring in the table, and use the built in tools to create points, which you then can convert to a grid. Also doable in Access or Excel.
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#3
NeverEasy

NeverEasy

    Contributor

  • Validated Member
  • PipPip
  • 28 posts
  • Finland

Got it - thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->