[postgis-devel] [SoC]Week 10 Report - Implement Geospatial Data Viewer in pgAdmin4 for PostGIS

Xuri Gong xurigoong at gmail.com
Wed Aug 1 07:24:37 PDT 2018


>
> Why as a modal popup, and not as another tab in the set of views?
> When someone says to me "postgis support in pgadmin" my thoughts leap to
> doing exploratory queries and seeing the results, for sure.


 The target of my work is implementing 'pgAdmin4 plugin for viewing data'
as specified in the initial wiki [1]. I do like to have postGIS support in
pgAdmin4 for some queries or even analysis and data viewer can be the first
step.

What happens when I query some geometry that is in a non-global projection,
> like UTM?



>  In the screenshot, I'm seeing SRID=4326 geometries on top of a Web
> Mercator map, so there is a coordinate transformation taking place
> somewhere.
>
> I don't see why other SRIDs (e.g. UTM) couldn't be transformed too.
> (Mind you, not all results look good on Web Mercator anyways.)


For SRID 4326 leaflet can transform the coordinates to Web Mercator. For
non-4326 SRIDs, the viewer will simply treat coordinate as X-Y and draw the
shape in x-y plane, just as data without coordinate system info. For
geometries with different SRIDs in the same one column, the viewer will
just render geometries with the same SRID in the map. It may look bad for
some data but it's not easy to perform coordinate transformations in
front-end. I searched some other similar data viewers like
postgis-preview[2] and github geoJSON viewer[3] and their strategies are
expecting the SRID to be 4326.

I have built the viewer and created a test database on my server. Welcome
to login and have a look at: http://pgadmin4.gooong.cn:5050 . The user name
is my email address and password is postgis_test . Please let me know if
you have any suggestions:).


[1] https://trac.osgeo.org/postgis/wiki/GoogleSummerCode2018
[2] https://github.com/NYCPlanning/labs-postgis-preview
[3] https://help.github.com/articles/mapping-geojson-files-on-github/


Mike Toews <mwtoews at gmail.com> 于2018年8月1日周三 上午6:00写道:

> On 31 July 2018 at 17:33, Xuri Gong <xurigoong at gmail.com> wrote:
> > As for the OSM tile layer, currently it would be added to the map only if
> > the geometry's SRID is 4326. There would be no tile layer for geometries
> > with other SRIDs because the viewer can't do coordinate transformations.
>
> In the screenshot, I'm seeing SRID=4326 geometries on top of a Web
> Mercator map, so there is a coordinate transformation taking place
> somewhere.
>
> I don't see why other SRIDs (e.g. UTM) couldn't be transformed too.
> (Mind you, not all results look good on Web Mercator anyways.)
>
> https://en.wikipedia.org/wiki/Web_Mercator
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180801/954515e3/attachment.html>


More information about the postgis-devel mailing list