[OSGeo Africa] Geoserver SQL View

Zibusiso Ncube ncubezedm at gmail.com
Fri Dec 10 11:27:52 PST 2021


Thanks Admire.

Yes you read through my question and intentions ... the thing is I have to
redo the whole setup and I was trying to shortcut the thinking process and
trying process to see if someone had actually done it ...before I start
breaking things apart on my system and rebuild stuff (code, tables, q.a.
measures the works, recommendations to end users etc etc) and creating test
data etc.

Thanks for the insights I will definitely use them.

Regards,

Zibusiso


On Fri, 10 Dec 2021, 20:38 Admire Nyakudya, <addloe at gmail.com> wrote:

> Hi
>
> Sent with a Spark <https://sparkmailapp.com/source?from=signature>
> On 10 Dec 2021, 11:17 +0200, Zibusiso Ncube <ncubezedm at gmail.com>, wrote:
>
> Good Day,
>
> I have a MySQL db instance that I am "replicating" (also a means to clean
> up my data via python) to a postgres instance.
>
> If your data doesn't have any relations you can use ogr2ogr to migrate it
> from mysql to Postgresql tables. If it has relations you will need to find
> a tool that allows you to convert between the two.
>
> initial i was creating  a points layers using lat and long fields in my db
> using SQLview using
>
> *ST_SETSRID(ST_POINT(point_longitude, point_latitude), 4326) as the_geom *I
> have some data that has 4 coordinate points and these are the corners
> of ploygons/areas of interest. Is it possible to use SQLviews in Geoserver
> to create polygons?
>
> Has someone tried this? How best can one do this?
>
> If your question is more about can Geoserver SQL views achieve this then
> yes it can.
>
>
> can i use something along the lines off...
>
> *ST_SETSRID(ST_POLYGON(point1xy, point2xy...pointZxy), 4326) as the_geom *
>
> *This sounds more like a question of how to write the SQL to achieve this.
> The Postgresql documentation has nice examples of this ie *
> https://postgis.net/docs/ST_MakePolygon.html
>
> * Alternatively you can check some of the answers on stack exchange as
> they provide solutions to this question i.e  *
> https://stackoverflow.com/questions/19046642/convert-points-to-polygon-using-postgis
>
> *?*Regards
>
> Zibusiso M Ncube
>
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org
> You can UNSUBSCRIBE at https://lists.osgeo.org/mailman/listinfo/africa
>
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org
> You can UNSUBSCRIBE at https://lists.osgeo.org/mailman/listinfo/africa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20211210/b00ed530/attachment.html>


More information about the Africa mailing list