Re: [Geoserver-users] Uploading SLD ExternalGraphic images via REST API?

2017-01-12 Thread Jody Garnett
Since the time the blog post example was written Alex "fixed" how the
styles folder was published to provide a good URL to use for external
applications that wish to access an external graphic.

The above example is in the "global" styles directory, grass_fill.png is
also be available via:

- http://localhost:8080/geoserver/styles/grass_fill.png

If we had an "icon" foo.png in a "test" workspace we would end up with:

- REST API:
http://localhost:8080/geoserver/rest/resource/workspaces/test/syles/foo.png
- Styles: http://localhost:8080/geoserver/styles/test/foo.png

The styles publish reflects how SLDs access external graphics, for example:

- http://localhost:8080/geoserver/styles/test/grass_fill.png

Since this icon is not found in workspace styles folder, it will grab the
png from global styles folder. This allows any SLD defined in your
workspace to smoothly refer to external graphics in the global styles
folder. If in the future you upload a grass_fill.png to the workspace
styles folder it would "override" the global one.


--
Jody Garnett

On 12 January 2017 at 19:30, Jody Garnett  wrote:

> Correct so that blog post has the following two examples:
>
> - http://localhost:8080/geoserver/rest/resource/styles/grass_fill.png
> - http://localhost:8080/geoserver/rest/resource/styles/grass_fill.png?
> operation=metadata&format=json
>
>
> --
> Jody Garnett
>
> On 12 January 2017 at 12:15, Jody Garnett  wrote:
>
>> The resources api was specificly created to upload and manage images and
>> icons (and the occasional config file). You have the correct
>> documentation link; I was able to produce a couple of GET examples for the 
>> geoserver
>> 2.9 release announcement
>> .
>>
>>
>> --
>> Jody Garnett
>>
>> On 11 January 2017 at 13:41, Martin Davis  wrote:
>>
>>> Can the REST API resources request [1] be used to upload image files for
>>> use in SLDs as external graphics?
>>>
>>> Are there any examples of how to do this?  In particular, it's not clear
>>> to me from the docs how to specify the location the files should be stored
>>> to.
>>>
>>> [1] http://docs.geoserver.org/stable/en/user/rest/api/resources.html
>>>
>>> 
>>> --
>>> Developer Access Program for Intel Xeon Phi Processors
>>> Access to Intel Xeon Phi processor-based developer platforms.
>>> With one year of Intel Parallel Studio XE.
>>> Training and support from Colfax.
>>> Order your platform today. http://sdm.link/xeonphi
>>> ___
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>
>>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Uploading SLD ExternalGraphic images via REST API?

2017-01-12 Thread Jody Garnett
Correct so that blog post has the following two examples:

- http://localhost:8080/geoserver/rest/resource/styles/grass_fill.png
-
http://localhost:8080/geoserver/rest/resource/styles/grass_fill.png?operation=metadata&format=json


--
Jody Garnett

On 12 January 2017 at 12:15, Jody Garnett  wrote:

> The resources api was specificly created to upload and manage images and
> icons (and the occasional config file). You have the correct
> documentation link; I was able to produce a couple of GET examples for the 
> geoserver
> 2.9 release announcement
> .
>
>
> --
> Jody Garnett
>
> On 11 January 2017 at 13:41, Martin Davis  wrote:
>
>> Can the REST API resources request [1] be used to upload image files for
>> use in SLDs as external graphics?
>>
>> Are there any examples of how to do this?  In particular, it's not clear
>> to me from the docs how to specify the location the files should be stored
>> to.
>>
>> [1] http://docs.geoserver.org/stable/en/user/rest/api/resources.html
>>
>> 
>> --
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> ___
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Uploading SLD ExternalGraphic images via REST API?

2017-01-12 Thread Martin Davis
Thanks, Jody.

So to be clear, the "path/to/resource" in [1] is relative to the GeoServer
data directory?

[1] http://docs.geoserver.org/stable/en/user/rest/api/resources.html

On Thu, Jan 12, 2017 at 10:15 AM, Jody Garnett 
wrote:

> The resources api was specificly created to upload and manage images and
> icons (and the occasional config file). You have the correct
> documentation link; I was able to produce a couple of GET examples for the 
> geoserver
> 2.9 release announcement
> .
>
>
> --
> Jody Garnett
>
> On 11 January 2017 at 13:41, Martin Davis  wrote:
>
>> Can the REST API resources request [1] be used to upload image files for
>> use in SLDs as external graphics?
>>
>> Are there any examples of how to do this?  In particular, it's not clear
>> to me from the docs how to specify the location the files should be stored
>> to.
>>
>> [1] http://docs.geoserver.org/stable/en/user/rest/api/resources.html
>>
>> 
>> --
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> ___
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Uploading SLD ExternalGraphic images via REST API?

2017-01-12 Thread Jody Garnett
The resources api was specificly created to upload and manage images and
icons (and the occasional config file). You have the correct documentation
link; I was able to produce a couple of GET examples for the geoserver 2.9
release announcement
.


--
Jody Garnett

On 11 January 2017 at 13:41, Martin Davis  wrote:

> Can the REST API resources request [1] be used to upload image files for
> use in SLDs as external graphics?
>
> Are there any examples of how to do this?  In particular, it's not clear
> to me from the docs how to specify the location the files should be stored
> to.
>
> [1] http://docs.geoserver.org/stable/en/user/rest/api/resources.html
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Uploading SLD ExternalGraphic images via REST API?

2017-01-11 Thread Martin Davis
Can the REST API resources request [1] be used to upload image files for
use in SLDs as external graphics?

Are there any examples of how to do this?  In particular, it's not clear to
me from the docs how to specify the location the files should be stored to.

[1] http://docs.geoserver.org/stable/en/user/rest/api/resources.html
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users