[GRASS-user] v.external, postgis materialized views and projection

Phillip Allen phillipjallen830 at gmail.com
Mon Aug 16 12:18:40 PDT 2021


Donovan,
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;

It is an easy enough test!

regards,
Phil


On Mon, Aug 16, 2021 at 1:10 PM Saulteau Don <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
> 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/3b51d8fe/attachment.html>


More information about the grass-user mailing list