Re: [Qgis-user] projection confused during import from Grass to QGIS

2015-05-12 Thread Paul Paris
Hi Tyler,

>From the gdalinfo output it would appear that you have no coordinate system
defined for your layer(s). Note the Coordinate System line. Here you
should--but do not--find datum, ellipsoid, projection type and its
associated parameters, units of measure, etc. Since your data are not
actually projected, you should see listed here something like:

PROJCS["WGS84",
GEOGCS["WGS84",
DATUM["World Geodetic_Datum_1984",
SPHEROID["WGS1984"],
UNIT["degree"]],
PROJECTION["Geographic"],
PARAMETER["scale_factor",0.0],
PARAMETER["false_easting",0.0],
PARAMETER["false_northing",0.0]


 Your output lists only the affine coordinate geo-reference info (e.g.,
Origin, Pixel Size, Corners).

With the addition of the negative signs in front of the (East/West)
longitudes, as Randy pointed out, you get the correct E-W orientation, but
you mention that a slight mis-alignment remains. About how much
mis-alignment do you measure?

Try setting the layer CRS explicitly in QGIS; I think that WGS84 is
EPSG=4326. That might help. Too, if the mis-alignment is small (small is
hard to define, I realize, when dealing with data in GPs), perhaps it has
something to do with floating point round-off in GRASS (FCELL versus
DCELL). Or, it could be related to the region, where the region set during
export differed from that native to the layer(s) itself/themselves. These
would account for only small differences. If there is larger mis-alignment
(for instance two or more layers do not even overlap geographically), then
something bigger is afoot.

Keep us posted on progress.

Paul


On Tue, May 12, 2015 at 8:44 AM, Tyler Smith  wrote:

> On Mon, May 11, 2015, at 05:20 PM, Randal Hale wrote:
> > > The header appears correct:
> > >
> > > tws:~$ head -6 tri_mean.asc
> > > north: 46:53:04.633938N
> > > south: 34:44:13.536462N
> > > east: 68:50:28.1616W
> > > west: 94:51:40.938811W
> > > rows: 1458
> > > cols: 3122
> > >
> > Shouldn't your east and west Lattitudes be negative? That would make it
> > appear reversed as they stand now. At least I think - but I've not done
> > what you are doing.
>
> I don't think so. The east and west lattitudes have a 'W' appended to
> indicate west. Although I have tried manually deleting the W and adding
> '-' in front of the digits. This does indeed flip the maps east to west,
> but they are still somewhat misaligned with the actual projection.
>
> Regardless, I can export and import the layers to share them across
> Grass installations without problem. The mis-projection only shows up
> with gdal and QGis.
>
> Thanks,
>
> Tyler
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] projection confused during import from Grass to QGIS

2015-05-12 Thread Tyler Smith
On Mon, May 11, 2015, at 05:20 PM, Randal Hale wrote:
> > The header appears correct:
> >
> > tws:~$ head -6 tri_mean.asc
> > north: 46:53:04.633938N
> > south: 34:44:13.536462N
> > east: 68:50:28.1616W
> > west: 94:51:40.938811W
> > rows: 1458
> > cols: 3122
> >
> Shouldn't your east and west Lattitudes be negative? That would make it 
> appear reversed as they stand now. At least I think - but I've not done 
> what you are doing.

I don't think so. The east and west lattitudes have a 'W' appended to
indicate west. Although I have tried manually deleting the W and adding
'-' in front of the digits. This does indeed flip the maps east to west,
but they are still somewhat misaligned with the actual projection.

Regardless, I can export and import the layers to share them across
Grass installations without problem. The mis-projection only shows up
with gdal and QGis.

Thanks,

Tyler 

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] projection confused during import from Grass to QGIS

2015-05-11 Thread Randal Hale
Shouldn't your east and west Lattitudes be negative? That would make it 
appear reversed as they stand now. At least I think - but I've not done 
what you are doing.


Randy


Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjh...@northrivergeographic.com
twitter:rjhale http://about.me/rjhale
http://www.northrivergeographic.com/introduction-to-quantum-gis

On 05/11/2015 05:11 PM, Tyler Smith wrote:

Hi,

I'm exporting some data from Grass 6.4 to QGis as .asc files. The source
location in Grass has the projection:

g.proj -p
-PROJ_INFO-
name   : Lat/Lon
proj   : ll
datum  : wgs84
ellps  : wgs84
no_defs: defined
-PROJ_UNITS
unit   : degree
units  : degrees
meters : 1.0

I generated the asc file from Grass with:

r.out.ascii input=tri_median@PERMANENT output=tri_median.asc

When I import this into QGis, the layer is flipped east to west - the
atlantic coast of NA appears on the west, rather than the east!

The header appears correct:

tws:~$ head -6 tri_mean.asc
north: 46:53:04.633938N
south: 34:44:13.536462N
east: 68:50:28.1616W
west: 94:51:40.938811W
rows: 1458
cols: 3122

But gdal mis-reads it:

tws:~$ gdalinfo tri_mean.asc
Driver: GRASSASCIIGrid/GRASS ASCII Grid
Files: tri_mean.asc
Size is 3122, 1458
Coordinate System is `'
Origin = (94.000,46.000)
Pixel Size = (-0.008327994875080,-0.008230452674897)
Corner Coordinates:
Upper Left  (  94.000,  46.000)
Lower Left  (  94.000,  34.000)
Upper Right (  68.000,  46.000)
Lower Right (  68.000,  34.000)
Center  (  81.000,  40.000)
Band 1 Block=3122x1 Type=Float32, ColorInterp=Undefined

I also tried opening this map directly from Grass within QGIS using the
Grass plugin. The problem persists - the projection of the map is
flipped east to west when it appears in QGIS.

Have I done something wrong somewhere, or is there a problem with the
Grass 6.4 export or QGis/gdal import?

Thanks!



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] projection confused during import from Grass to QGIS

2015-05-11 Thread Tyler Smith
Hi,

I'm exporting some data from Grass 6.4 to QGis as .asc files. The source
location in Grass has the projection:

g.proj -p
-PROJ_INFO-
name   : Lat/Lon
proj   : ll
datum  : wgs84
ellps  : wgs84
no_defs: defined
-PROJ_UNITS
unit   : degree
units  : degrees
meters : 1.0

I generated the asc file from Grass with:

r.out.ascii input=tri_median@PERMANENT output=tri_median.asc 

When I import this into QGis, the layer is flipped east to west - the
atlantic coast of NA appears on the west, rather than the east!

The header appears correct:

tws:~$ head -6 tri_mean.asc 
north: 46:53:04.633938N
south: 34:44:13.536462N
east: 68:50:28.1616W
west: 94:51:40.938811W
rows: 1458
cols: 3122

But gdal mis-reads it:

tws:~$ gdalinfo tri_mean.asc 
Driver: GRASSASCIIGrid/GRASS ASCII Grid
Files: tri_mean.asc
Size is 3122, 1458
Coordinate System is `'
Origin = (94.000,46.000)
Pixel Size = (-0.008327994875080,-0.008230452674897)
Corner Coordinates:
Upper Left  (  94.000,  46.000) 
Lower Left  (  94.000,  34.000) 
Upper Right (  68.000,  46.000) 
Lower Right (  68.000,  34.000) 
Center  (  81.000,  40.000) 
Band 1 Block=3122x1 Type=Float32, ColorInterp=Undefined

I also tried opening this map directly from Grass within QGIS using the
Grass plugin. The problem persists - the projection of the map is
flipped east to west when it appears in QGIS.

Have I done something wrong somewhere, or is there a problem with the
Grass 6.4 export or QGis/gdal import?

Thanks!

-- 
  Tyler Smith
  plantarum.ca
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user