[GRASS-user] v.external, postgis materialized views and projection
Donovan Cameron
sault.don at gmail.com
Mon Aug 16 22:05:55 PDT 2021
On 2021-08-16 12:18 p.m., Phillip Allen wrote:
> I am not sure about GRASS's quirks in respect to this problem but I do
> see in QGIS that in my views I often have to specifically CAST my
> geometries so QGIS can see the Z & M values:
>
> example: SELECT b. sample_id, b. au_ppm, b. as_ppm, b. cu_ppm,
> ST_TRANSFORM(b.geom, 32718 )::geometry(LineStringZM,32718) FROM
> bore_hole b;
Tested on a new set of polygons and casted but it didn't make a
difference. GRASS doesn't like ST_Transform on materialized views it
looks like.
All the views are opening in QGIS fine and with their correct projection
and geometry type (with and without casting to a specific type).
>
>
> On Mon, Aug 16, 2021 at 1:10 PM Saulteau Don <sault.don at gmail.com
> <mailto:sault.don at gmail.com>> wrote:
>
> When I use v.external to load a postgis materialized view it says
> the projection mismatches the Location but they are actually the same.
>
> % v.external input="PG:host=localhost dbname=database"
> layer=table_1 output=t
> ERROR: Projection of dataset does not appear to match current
> location.
>
>
> Location PROJ_INFO is:
> name: NAD83 / UTM zone 10N
> datum: nad83
> ellps: grs80
> proj: utm
> zone: 10
> no_defs: defined
> init: EPSG:26910
>
> Dataset PROJ_INFO is:
> name: NAD83 / BC Albers
> datum: nad83
> ellps: grs80
> proj: aea
> lat_0: 45
> lon_0: -126
> lat_1: 50
> lat_2: 58.5
> x_0: 1000000
> y_0: 0
> no_defs: defined
>
> Difference in: proj
>
> In case of no significant differences in the projection
> definitions,
> use the -o flag to ignore them and use current location
> definition.
> Consider generating a new location from the input dataset
> using the
> 'location' parameter.
>
> It looks like GRASS sees the projection from the source table used
> for the materialized view instead of the materialized views
> projection that was set in postgis using ST_Transform().
>
> Is this normal for grass to see materialized views like this?
>
>
>
>
> Donovan
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/grass-user
> <https://lists.osgeo.org/mailman/listinfo/grass-user>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20210816/722c4a4f/attachment-0001.html>
More information about the grass-user
mailing list