[Geoserver-devel] Regression Accessing Styles Directory

A regression with accessing the styles directory was introduced in GeoServer
2.9.2 and 2.10.0 as a result of fixing workspace styles for
[GEOS-7635] - Jira. In previous versions, it
was possible to access files within subdirectories (e.g.,
'styles/icons/tropical_cyclone/hurricane_north.png') but that now returns an
error "Unexpected number of tokens in reqest path.". SLD external graphics
can still be used in this manner for formats like JPEG and PNG but this
breaks KML output since the HTTP requests to retrieve the images will fail.

This was useful to keep the number of files in the root styles directory at
a more manageable level with styles that can access over 100 different
icons. Would there be any objections to updating
org.geoserver.ows.StylePublisher to allow accessing styles subdirectories
again?

Steve Ikeoka

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Regression-Accessing-Styles-Directory-tp5313244.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

No objection, indeed encouragement as we have a release scheduled for Wednesday.

I would ask that you report the bug to the issue tracker while preparing a patch, so we can discuss this issue in tomorrows meeting. I have CCed the author of StylePublisher (Alex Goudine) who in his defence pair programmed that one with me :slight_smile:

I am not sure I understand you description:

  • the style publisher treats tropical_cyclone as a workspace name, not a sub directory. I do not have a suggestion for resolving this naming conflict at present
  • I do not understand your comment about SLD external graphics vs KML output - does the KML encoder need to be fixed?
···

On 20 March 2017 at 13:43, sikeoka <steve.ikeoka@anonymised.com> wrote:

A regression with accessing the styles directory was introduced in GeoServer
2.9.2 and 2.10.0 as a result of fixing workspace styles for
https://osgeo-org.atlassian.net/browse/GEOS-7635. In previous versions, it
was possible to access files within subdirectories (e.g.,
‘styles/icons/tropical_cyclone/hurricane_north.png’) but that now returns an
error “Unexpected number of tokens in reqest path.”. SLD external graphics
can still be used in this manner for formats like JPEG and PNG but this
breaks KML output since the HTTP requests to retrieve the images will fail.

This was useful to keep the number of files in the root styles directory at
a more manageable level with styles that can access over 100 different
icons. Would there be any objections to updating
org.geoserver.ows.StylePublisher to allow accessing styles subdirectories
again?

Steve Ikeoka


View this message in context: http://osgeo-org.1560.x6.nabble.com/Regression-Accessing-Styles-Directory-tp5313244.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


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


Jody Garnett

I created a JIRA ticket [GEOS-8040] - Jira and
will try to submit a pull request today.

When these images are loaded for an output format like PNG or JPEG, the
images are loaded internally by the renderer and work fine since they do not
go through StylePublisher. For KML output, the KML IconStyle will contain a
URL like
http://localhost:8080/geoserver/styles/icons/tropical_cyclone/hurricane_north.png
so StylePublisher throws an error when a client like Google Earth tries to
load the image.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Regression-Accessing-Styles-Directory-tp5313244p5313437.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Here is the pull request:

The build exceeding the time limit doesn't appear to be related.

Steve Ikeoka

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Regression-Accessing-Styles-Directory-tp5313244p5313486.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.