3

I intend to create a custom Geotools function that does some special insertions into a PostGIS DB.

My question is how to call that function from Openlayers?

6

The easiest (only?) way to do this would be to create a WPS function, add that to GeoServer and then call it from OpenLayers.

4
  • Ian, is it ok to make it a WPS function, although this is not the task of WPS? it's something like a custom WFTS function.
    – Faz B
    Mar 12 '18 at 15:32
  • I'm not sure if a function would be callable via a WFS-T you'd have to try, could call WPS to make the change and then WFS to post change
    – Ian Turton
    Mar 12 '18 at 15:34
  • Can one create a custom WFS-T function? e.g. WFS:CustomInsert
    – Faz B
    Mar 12 '18 at 15:38
  • Maybe you could ask another question which is about why you want to do this.
    – Ian Turton
    Mar 12 '18 at 18:16
3

Just a stab in the dark but... create an application stack that has geoserver and a programming language container application that uses geo json, a java script library and the like and use that to call and put to the hosted layer. The problem is your question is too broad and indicates you need to do some homemwork, as you don't grasp the complexity of the task you are undertaking. Then someone giving a line of script would be easy. A lyer is only the visual representation and not the coding that is needed on the backend application. Look up LAMP AMP stacks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.