Hamish wrote:
Peter Löwe wrote:
does anybody have an example how to create a xy-location using g.proj
-c ?Calling up g.proj from within a xy-location using the -j/-w flags (to
create output in wkt/proj format) results in the info "xy location
(unprojected)". This doesn't really help.Michael Barton wrote:
AFAIK, you cannot create an xy location using g.proj. g.proj is for
creating projected locations. xy is not projected. When I wanted to
create an xy location for the new wxPython location wizard, I had to
code it myself. That said, it's not hard to create the WIND, etc files
for an xy location.
If this doesn't exist, then we should look at adding the functionality.
for example:
g.proj -c location="newloc" wkt=none
or
g.proj -c location="newloc" wkt=XY
or
g.proj -c location="newloc" wkt=unprojected
It's a good idea IMO. But I'd suggest not to mix WKT with
this - WKT has it's strict meaning (there's no WKT
representation for GRASS XY location settings AFAIK; is
there?). Moreover, wkt= parameter is supposed to be a file.
How about this: if -c is used and no wkt, georef or proj4
parameters are given, assume XY?
BTW, I noticed a following sentence in g.proj manual
regarding georef option: "If the file is not georeferenced
or cannot be read, XY (unprojected) will be used". But it
does not work:
(file xy does not exist):
$ g.proj -c georef=xy
Trying to open with OGR...
Trying to open with GDAL...
ERROR 4: `xy' does not exist in the file system,
and is not recognised as a supported dataset name.
ERROR: Could not read georeferenced file xy using either OGR
nor GDAL
(file xy is empty):
$ touch xy
$ g.proj -c georef=xy
Trying to open with OGR...
Trying to open with GDAL...
ERROR 4: `xy' not recognised as a supported file format.
ERROR: Could not read georeferenced file xy using either OGR
nor GDAL
Maciek