[GRASS-user] Import, project

Hi,

I am new to grass and don’t really know where to start.

Please give me some hints on

  1. how to import+project a vector-shapefile (containing one layer of non-overlapping administrative regions) with unknown projection+coordinate-system into a database with latitude/longitude

  2. how to import+project a e00-rasterfile into the same database (containing rasterpoints 1kmx1km, each with one scalar property)

  3. how to export an ascii/excel/csv-list of every raster-point with a) the corresponding scalar and b) the administrative region and c) the coordinates lat/long of the raster-point

I could not import because the files be imported have a different coordinate system and import was refused because of that.

I tried to google for a commandline/gui-program that reprojects, found a few like shpproj, g.proj, m.proj, none of which seem to have anything to do with reprojecting a shape-file.

I use grass 6.4 on windows (linux is fine too) and have already created a workspace fitted for germany with lat/long-coordinates in an appropriate resolution.

Thanks
stn

Hi,

I am new to grass and don’t really know where to start.

With the man pages :wink:

Please give me some hints on

  1. how to import+project a vector-shapefile (containing one layer of non-overlapping administrative regions) with unknown projection+coordinate-system into a database with latitude/longitude

If you don’t know the projection of the source layer, you’re pretty much out of luck. There’s no way GRASS (or any GIS for that matter) can use geographic data without knowing its CRS.
No *.prj attached to the shapefile?? Does it overlap correctly with other layers of known CRS??

  1. how to import+project a e00-rasterfile into the same database (containing rasterpoints 1kmx1km, each with one scalar property)

I’m not sure about e00 raster. I think you have to import as a vector then convert to raster, so:
v.in.e00
then use one of the interpolation modules (i.e. v.surf.rst)
Another way might be to use ogr2ogr to convert the e00 file to an ascii grid, then import that as a raster.

  1. how to export an ascii/excel/csv-list of every raster-point with a) the corresponding scalar and b) the administrative region and c) the coordinates lat/long of the raster-point

r.out.xyz does that

I could not import because the files be imported have a different coordinate system and import was refused because of that.

I tried to google for a commandline/gui-program that reprojects, found a few like shpproj, g.proj, m.proj, none of which seem to have anything to do with reprojecting a shape-file.

If you do find the correct projection of the original shapefile, then you’ll need to create two GRASS locations: one defined by the projection of the shapefile, and the second defined by Lon/Lat WGS84 . Then you

  • import the shapefile into the Location that matches its projection
  • switch to the target (WGS84) Location
  • and from there, you run v.proj to reproject into the target projection.

I use grass 6.4 on windows (linux is fine too) and have already created a workspace fitted for germany with lat/long-coordinates in an appropriate resolution.

Keep us posted on your progress.

···
-- 
Micha Silver
Arava Development Co. +972-52-3665918
[http://surfaces.co.il](http://surfaces.co.il)

2) how to import+project a e00-rasterfile into the same database (containing
rasterpoints 1kmx1km, each with one scalar property)

This solution may not help if ESRI software is inaccessible, but
perhaps the maintainer of the .e00 data can do this conversion for
you. I verified it does work (I cant locate how to import a raster
.e00). The raster ascii .e00 uses different formatting than an export
from ArcToolbox using "Raster to ASCII". I imported a raster .e00 in
ArcToolbox to an arc/info GRID, then exported it to an ASCII file with
the ArcCatalog tool "Raster to ASCII". This exported raster ASCII
data can be directly imported into GRASS with the r.in.arc module.

I also noticed that if you tail the last portion of the raster .e00
file ($ tail -n 50 someFile.e00), you can see the projection
definition information, which helps to setup the right location in
GRASS for importing. Note: you will only see the definition if a user
applied the definition.

Apologies in advance for a non-open source solution, but I hope can
help if there are no other options.

Mark