[Geoserver-users] Dynamic Workspaces with dynamic mapping query string

Hi GeoServer Experts,

I am new on geoserver. We are trying to move esri to open source. I have worked with esri software for past years years. Now, I just set up a GeoServer 2.14 on my pc. It was very strange forward to get map services running with shapefile and postgis database as well. Great experiences!!

A major function in our current application is using ArcGIS Server dynamic map server with a Dynamic Workspaces. For example, our application can create a map for Foreign-Born Population after any combination of countries selected by a web user. Esri has Dynamic map services. The map services with a database connection set up called dynamic workspace. developer can pass any query string dynamically based on user needs “select country, population from table1 inner join table2 …”.

The advantage of the dynamic workspace is that maps created at server side with a great performance by a query string. It is way better than graphics be generated on browser client side.

Please let me know what if we move to GeoServer, how can we achieve such function to use GeoServer? Thanks in advance!

Best,

Tom

Hi,

geoserver layers can be generated from SQL. Moreover you can add parameters
on each one.

For example, you can setup a layer as "select ID,geometryField, country from
table where country = %cntry%" and then define a "cntry" parameter to this
view.

You can then perform GetMap or GetFeature requests and pass the cntry
parameter.

More info here :

https://docs.geoserver.org/stable/en/user/data/database/sqlview.html

Hope this helps.

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

HI Olyster,

Really appreciated and yes, this could be the best solution for parameter-zing SQL views. I will do more tests on it. In our case, almost it will be like this

At lease, I have to redesign our table with standard names like, ID, NAME, POPULATION then I may need to have parameters not only in sql where clause, it may like as “select t1.ID, t1.geometryField, t2.NAME, t2. POPULATION from
table t1 inner join %tablename% t2 on t1.id = t2.id where %userinputclumnvalues%”.

I will give a try to see how works.

Best,

Tom

On Fri, Nov 2, 2018 at 11:47 AM Olyster <gagnon_olivier@anonymised.com..> wrote:

Hi,

geoserver layers can be generated from SQL. Moreover you can add parameters
on each one.

For example, you can setup a layer as “select ID,geometryField, country from
table where country = %cntry%” and then define a “cntry” parameter to this
view.

You can then perform GetMap or GetFeature requests and pass the cntry
parameter.

More info here :

https://docs.geoserver.org/stable/en/user/data/database/sqlview.html

Hope this helps.


Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This would allow fully open SQL injection attacks (so you’ll have to be in control of whatever is adding view params in the requests), plus,
it’s unadvisable to have a sql view whose output columns can change, GeoServer won’t work well with it (at the very least, the
WFS portion of GeoServer).

Cheers

Andrea

image.png

···

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.