[Geoserver-devel] custom wps process on geoserver

Hello,

I am new to Geoserver and using it, so I would like to verify my idea with
you:

My plan is to implement my own Heatmap transformation based on the existing
one (gs:Heatmap) and use it as a WPS Process on the Geoserver. I would like
this process to generate a complete Heatmap and send it to the client on
request.

My solution for this is to use the existing classes HeatmapProcess.java and
HeatmapSurface.java and customize them. The HeatmapProcess.java is a WPS
process generating a GridCoverage2D. However, I would like to send already
renderes PNG files to the client.

What is the best way to achieve this and am I on the right track?

Thank you!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/custom-wps-process-on-geoserver-tp5207974.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Hi NIck,
I think you might not need to create a new process, but just to
chain toghether the Heatmap one with the StyleCoverage one.
No code writing needed, just make the output of the heatmap
process be the input of the style one, try it with the wps request builder.

Cheers
Andrea

···

On Thu, May 28, 2015 at 11:18 AM, nickfx <teslabyte@anonymised.com> wrote:

Hello,

I am new to Geoserver and using it, so I would like to verify my idea with
you:

My plan is to implement my own Heatmap transformation based on the existing
one (gs:Heatmap) and use it as a WPS Process on the Geoserver. I would like
this process to generate a complete Heatmap and send it to the client on
request.

My solution for this is to use the existing classes HeatmapProcess.java and
HeatmapSurface.java and customize them. The HeatmapProcess.java is a WPS
process generating a GridCoverage2D. However, I would like to send already
renderes PNG files to the client.

What is the best way to achieve this and am I on the right track?

Thank you!


View this message in context: http://osgeo-org.1560.x6.nabble.com/custom-wps-process-on-geoserver-tp5207974.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.



Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

==
Meet us at the INSPIRE Conference in Lisbon 25-29 May 2015! Visit http://goo.gl/WHKDXT for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Hi Andrea,

thanks for your reply. I actually would like to write my own code for the
calculations. Thats why I cant use the existing process. So I was wondering
what the best way to create my own Heatmap process would look like.

Thanks!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/custom-wps-process-on-geoserver-tp5207974p5207983.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

On Thu, May 28, 2015 at 11:48 AM, nickfx <teslabyte@anonymised.com> wrote:

Hi Andrea,

thanks for your reply. I actually would like to write my own code for the
calculations. Thats why I cant use the existing process. So I was wondering
what the best way to create my own Heatmap process would look like.

I guess the easiest way would be to make your process implement
GeoServerProcess,
and register it in the application context, it will show up in the gs
process
group.
Here is an example and some references:
https://github.com/geoserver/geoserver/blob/master/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/gs/PagedUniqueProcess.java
https://github.com/geoserver/geoserver/blob/master/src/extension/wps/wps-core/src/main/java/applicationContext.xml#L201
https://github.com/geoserver/geoserver/blob/master/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/gs/GeoServerProcess.java

Cheers
Andrea

--

Meet us at the INSPIRE Conference in Lisbon 25-29 May 2015! Visit
http://goo.gl/WHKDXT for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

and is there any way to use the already existing gs:Heatmap process? I would
like to base my custom-made one on the existing one? This way, I could just
replace the part with the calculations and leave everything else as is.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/custom-wps-process-on-geoserver-tp5207974p5207990.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

The code is open source so you can use it as a starting point as long as you respect the license :slight_smile:

On Thu, May 28, 2015 at 3:28 AM nickfx <teslabyte@anonymised.com403…> wrote:

and is there any way to use the already existing gs:Heatmap process? I would
like to base my custom-made one on the existing one? This way, I could just
replace the part with the calculations and leave everything else as is.


View this message in context: http://osgeo-org.1560.x6.nabble.com/custom-wps-process-on-geoserver-tp5207974p5207990.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.



Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

I noticed that the existing HeatmapProcess implements VectorProcess. What
would be the difference between using VectorProcess and GeoserverProcess?

And my second question is: I was trying to just take the existing
HeatmapProcess and replace the part with the calculations by my own ones.
However, Geoserver does not recognize this customized process as a new one
and instead, it gets listed as gs:Heatmap in the WPS processes list. Any way
to avoid this?

Thanks for your help!

@jody.garnett: yes, thats what i am trying to do. I am using the existing
processes.java to implement mine.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/custom-wps-process-on-geoserver-tp5207974p5209916.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.