[GRASS-user] Import, project

Daniel Victoria daniel.victoria at gmail.com
Thu Jun 17 21:47:25 EDT 2010


As others have said, a shapefile is composed of several other files
(.shp, .shx, .dbf, .prj), each containing some different info. So,
even though the polygons and points coordinates are inside the .shp
file, you need to know the projection in order to know what those
coordinates represent (lat/long, meters, yards etc...).

Unfortunately, ESRI products will tolerate shapefiles without a
specific projection description (.prj file). So, if you don't have the
.prj file you can try some different approaches:
1) ask the data provider for the info
2) load the data against some other map with know projection. Here, I
believe QGis will allow you to load shapefiles even if you don't have
the prj file. So you will have to compare the data visually.

Of course the values of the coordinates can give you some hints as to
if you are working with UTM, lat/long etc...

Cheers
daniel

On Thu, Jun 17, 2010 at 6:00 PM, stn <stneumann at web.de> wrote:
>
>
> 2010/6/17 Hamish <hamish_b at yahoo.com>
>>
>> you have to create a GRASS Location for each source map projection, then
>> pull them all into the target Location with r.proj or v.proj.
>
> Hi Hamish, thanks for the infos.
>
>
> Here is one thing I can't get into my head.
>
> First there is the problem that I do not know the coordinates and projection
> etc of the two files mentioned. Of course I can go to someone with
> esri-software and ask him to check that for me.
>
> But in my (apparently very naive) view I this is completely not the point.
> If I have to use esri anyway then why bother taking data into grass ??
>
> What I would think is this: If I can find out the projection/coordinates etc
> of the shapefile by any manual means then this info MUST BE included in the
> shapefile itself. Along with the actual geodata.
>
> More so the import-program within grass cannot import even a single byte
> without thorough knowledge of the imported format, but i seems that it can
> only read objects but not their coordinate-system.
>
>
> So: If all the info is already in the shapefile there then why
>
> 1) do I have to manually find it by some way outside grass and
>
> 2) why doesn't the import-program simply read that info from the file, read
> the coordinates and projection from the current location and the call the
> appropriate projection-program to reproject the imported file to fit the
> current location.
>
> All the infos (proj/coord/bounds/etc) of import and target are there (says
> the naive man :-) , the sequence of operations is completely obvious and
> always exactly the same and yet everything has to be done manually.
>
> If I want to recode a moviefile to another format I tell the encoder what I
> want to have as an output and the encoder then looks by itself what format
> the original has. What is different about geodata ?
>
> I don't really mind doing that for one map. But somehow I expect lots more
> maps from different sources being added later and each one causing lots of
> work. What is it I don't understand here?
>
>
>
>
>> > 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
>>
>> r.out.xyz, or r.to.vect + v.out.ascii
>> maybe with some other custom magic along the way.
>
> Thanks, that sounds promising. I will try ASAP.
>
>
>
>>
>> from the command line GDAL's ogr2ogr and gdalwarp can reproject shapefiles
>> and GeoTiffs etc directly.
>
> Tried that (on ubuntu) :
>
> user at nb ~ $ gdalwarp file1.shp file1.out
> ERROR 4: `file1.shp' not recognised as a supported file format.
>
> and: gdalwrap --formats lists 88 formats including a few from esri, but no
> shapefile.
>
>
> stn
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>


More information about the grass-user mailing list