Hi,
I copied an SLD from here: http://linux.com/feature/148307?theme=print to test out.
I created a simple shapefile datastore with 1 2008Tiger shapefile to test it and it works (except it doesn’t print the street names ).
I then created a postGIS datastore with 1 table for the edges layer and filled it with 1 shapefile’s worth of data. I then registered this postGIS instance as a datastore and attempted to apply the same style to that map. I got an error:
org.vfny.geoserver.wms.WmsException: The requested Style can not be used with this layer. The style specifies an attribute of MTFCC and the layer is: it.geosolutions:edges
at org.geoserver.wms.kvp.GetMapKvpRequestReader.checkStyle(GetMapKvpRequestReader.java:967)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:316)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1087)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:428)
Any ideas why this would be?
In looking at the feature type editor at the bottom I do see the “mtfcc” attribute.
thanks
–
Signed,
Alessandro Ferrucci
Alessandro Ferrucci ha scritto:
Hi,
I copied an SLD from here: http://linux.com/feature/148307?theme=print to test out.
I created a simple shapefile datastore with 1 2008Tiger shapefile to test it and it works (except it doesn't print the street names ).
I then created a postGIS datastore with 1 table for the edges layer and filled it with 1 shapefile's worth of data. I then registered this postGIS instance as a datastore and attempted to apply the same style to that map. I got an error:
org.vfny.geoserver.wms.WmsException: The requested Style can not be used with this layer. The style specifies an attribute of MTFCC and the layer is: it.geosolutions:edges
at org.geoserver.wms.kvp.GetMapKvpRequestReader.checkStyle(GetMapKvpRequestReader.java:967)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:316)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1087)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:428)
Any ideas why this would be?
In looking at the feature type editor at the bottom I do see the "mtfcc" attribute.
Case sensitivity. The attribute names are always case sensitive, they come out uppercase from the shapefile and lowercase from postgis, so
the same style cannot be used for both.
Fix the attribute names in the SLD accordingly.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Thank you so much that worked!
Alessandro Ferrucci
On Tue, Mar 31, 2009 at 3:58 AM, Andrea Aime <aaime@anonymised.com> wrote:
Alessandro Ferrucci ha scritto:
Hi,
I copied an SLD from here: http://linux.com/feature/148307?theme=print to test out.
I created a simple shapefile datastore with 1 2008Tiger shapefile to test it and it works (except it doesn’t print the street names ).
I then created a postGIS datastore with 1 table for the edges layer and filled it with 1 shapefile’s worth of data. I then registered this postGIS instance as a datastore and attempted to apply the same style to that map. I got an error:
org.vfny.geoserver.wms.WmsException: The requested Style can not be used with this layer. The style specifies an attribute of MTFCC and the layer is: it.geosolutions:edges
at org.geoserver.wms.kvp.GetMapKvpRequestReader.checkStyle(GetMapKvpRequestReader.java:967)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:316)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1087)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:428)
Any ideas why this would be?
In looking at the feature type editor at the bottom I do see the “mtfcc” attribute.
Case sensitivity. The attribute names are always case sensitive, they come out uppercase from the shapefile and lowercase from postgis, so
the same style cannot be used for both.
Fix the attribute names in the SLD accordingly.
Cheers
Andrea
–
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
–
Signed,
Alessandro Ferrucci