[GRASS-user] Question on how to import lat-long data into a lambert conic confromal location

Hamish hamish_nospam at yahoo.com
Mon Jul 3 05:46:16 EDT 2006


Thomas Adams wrote:

> For the longest time the way I have imported lat-long data into a 
> non-lat/long location was to import the data into a lat/long location 
> and then reprojected the data into (say) a lambert conic confromal 
> location. So, I would have to exit GRASS (and from my lat/long
> location) and then re-start GRASS, the 2nd time going into my LCC
> location. I believe there are more straight-forward ways to do this;
> but how? What I have been doing works just fine, but I'd like to
> improve my efficiency.

what kind of data?

r.proj and v.proj will only pull data into the current mapset, the LL
step is needed.

point data may be reprojected with m.proj, which is really just a shell
script frontend to cs2cs from PROJ.4, but easier.


depending on your data type, gdalwarp may help you transform the data
before entering GRASS. I suspect this is your best chance at efficiency.
See the r.in.wms/r.in.onearth scripts for an example.

#convert the data to the current location, create Erdas Imagine Images (HFA)
gdalwarp -s_srs $SRC -t_srs "`g.proj -wf`" -of HFA \
   ${IMAGEFILE} ${IMAGEFILE_GDALWARP}


actually now that I look I see r.in.wms has a r.in.gdalwarp script, try
that.


Hamish




More information about the grass-user mailing list