[Geoserver-users] geoserver REST api, get map raster

does anybody know, can I retrieve by REST service in GeoServer an raster representation of layer? Just like in for ex. ArcGIS REST Api: when I send:

    MapServer/export?dpi=96&transparent=true&format=png8&bbox=338477.336%2C360036.34849999996%2C619993.648%2C548154.8615&bboxSR=2180&imageSR=2180&size=1064%2C711&f=image

in response I get png image of layer in defined bbox.


View this message in context: geoserver REST api, get map raster
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Wed, Jul 17, 2013 at 1:25 PM, Krystian <pruszynski.krystian@anonymised.com>wrote:

does anybody know, can I retrieve by REST service in GeoServer an raster
representation of layer? Just like in for ex. ArcGIS REST Api: when I send:

    MapServer/export?dpi=96&transparent=true&format=png8&bbox=338477.336%2C360036.34849999996%2C619993.648%2C548154.8615&bboxSR=2180&imageSR=2180&size=1064%2C711&f=image

in response I get png image of layer in defined bbox.

You have to use WMS GetMap, you should be able to find lots of examples
online (and you can download
the specification from the OGC web site, too)

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it 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

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

Hi Krystian,
That should be possible with a standard WMS request. For example the following creates a PNG of our 1:50k OS raster:

http://wppgeog3:8082/geoserver/OS_Rasters/wms?service=WMS&version=1.1.0&request=GetMap&layers=OS_Rasters:50000_Colour&styles=&bbox=400000.0,220000.0,460000.0,320000.0&width=307&height=512&srs=EPSG:27700&format=image%2Fpng

Jonathan

On 17 July 2013 12:25, Krystian <pruszynski.krystian@anonymised.com> wrote:

does anybody know, can I retrieve by REST service in GeoServer an raster representation of layer? Just like in for ex. ArcGIS REST Api: when I send:

    MapServer/export?dpi=96&transparent=true&format=png8&bbox=338477.336%2C360036.34849999996%2C619993.648%2C548154.8615&bboxSR=2180&imageSR=2180&size=1064%2C711&f=image

in response I get png image of layer in defined bbox.


View this message in context: geoserver REST api, get map raster
Sent from the GeoServer - User mailing list archive at Nabble.com.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

thank you for quick replay.

Yes, i know I can do it via WMS interface, but this solution would need some
server-based coding for parsing XML response and so on... and my application
is pure JavaScript and I've just implemented REST API and just wondering how
to connect it to geoserver...

so if getting raster as response is not possible, so maybe somehow I can
request for geometry (coordinates) and get response in JSON format for ex.?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/geoserver-REST-api-get-map-raster-tp5067026p5067042.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Wed, Jul 17, 2013 at 2:00 PM, Krystian <pruszynski.krystian@anonymised.com>wrote:

thank you for quick replay.

Yes, i know I can do it via WMS interface, but this solution would need
some
server-based coding for parsing XML response and so on... and my
application
is pure JavaScript and I've just implemented REST API and just wondering
how
to connect it to geoserver...

so if getting raster as response is not possible, so maybe somehow I can
request for geometry (coordinates) and get response in JSON format for ex.?

GeoServer does not implement the ESRI REST api, which unfortunately has
a incredibly poorly chosen name, as REST is a type of protocol.
It's like asking if GeoServer implements SOAP o HTTP api, but having in mind
a particular implementation of it.

The GeoServer REST Configuration API is meant for configuration only, and
has
been around longer than the ESRI one, but it does not do the same things,
it's the to allow the automation of config changes such as adding a layer,
changing a style and so on.

If you want GeoJSON you can get it via the WFS protocol, but we don't
support
the custom JSON format ESRI uses

That said, nothing prevents anyone from implementing the ESRI REST API
on top of GeoServer, or to build a json output format that's compatible with
the ESRI proprietary syntax, it's just a matter of putting the necessary
reosources
on the table. Nobody has done that so far afaik.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it 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

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