textSymbolizer and featureType attributes acces problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

textSymbolizer and featureType attributes acces problem

Michael Jenik
Hi...

I'm useing 1.3.RC-2 geoserver.

I'm trying to see points with labels.

I have a table in postgis with two columns :
description, and the_geom.

I have created the featureType in geoserver and I can
see the points useing point.sld .
But when I use a SLD with a textSymbolizer refereing
to the field description, Geoserver can't display
anything and returns an xml error reportin it cant
find the field.

Here is what I see freom Geoserver:
<ServiceExceptionReport version="1.1.1">
-
        <ServiceException code="">
The requested Style can not be used with this
featureType.  The style specifies an attribute of
descripcion and the featureType definition is:
DefaultFeatureType [name=puntos ,
namespace=http://www.openplans.org/topp ,
abstract=false , types=(DefaultAttributeType
[name=the_geom , type=class
com.vividsolutions.jts.geom.Point , nillable=true,
min=1, max=1],)]
</ServiceException>
</ServiceExceptionReport>

Here is the SLD:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld
StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a named layer is the basic building block of an
sld document -->
<NamedLayer><Name>normal</Name>
<UserStyle>
    <!-- again they have names, titles and abstracts
-->
 
  <Title>A boring default style</Title>
  <Abstract>A sample style that just prints out a
black line for everything</Abstract>
    <!-- FeatureTypeStyles describe how to render
different features -->
    <!-- a feature type for polygons -->
    <FeatureTypeStyle>
      <FeatureTypeName>Feature</FeatureTypeName>
      <Rule>
        <!-- like a linesymbolizer but with a fill too
-->
        <PointSymbolizer>
       <Graphic>
        <Mark>
        <WellKnownName>circle</WellKnownName>
        <Fill>
        <CssParameter
name="fill">#ff0000</CssParameter>
        </Fill></Mark><Size>15.0</Size></Graphic>
        </PointSymbolizer>
        <TextSymbolizer>
            <Label>
               
<ogc:PropertyName>description</ogc:PropertyName>
           </Label>
        </TextSymbolizer>
      </Rule>
    </FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>





I have been able to see the labels in older releases
...so I dont know if this is a bug or if I have ti
define correctly the featuretype.

Thanks in advance.

Michael


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: textSymbolizer and featureType attributes acces problem

Chris Holmes-2
Hmmmm...  Well it looks like at least one place you spelled it
'descripcion' instead of 'description', as it says descripcion in the
error report.  If the spelling is off it won't work.  I thought that
error should report what all the possible attributes are, but perhaps
they get filtered out before hand.  But yes, first try to confirm that
all your spelling is the same.  If that doesn't work let me know.

Chris

Quoting Michael Jenik <[hidden email]>:

> Hi...
>
> I'm useing 1.3.RC-2 geoserver.
>
> I'm trying to see points with labels.
>
> I have a table in postgis with two columns :
> description, and the_geom.
>
> I have created the featureType in geoserver and I can
> see the points useing point.sld .
> But when I use a SLD with a textSymbolizer refereing
> to the field description, Geoserver can't display
> anything and returns an xml error reportin it cant
> find the field.
>
> Here is what I see freom Geoserver:
> <ServiceExceptionReport version="1.1.1">
> -
> <ServiceException code="">
> The requested Style can not be used with this
> featureType.  The style specifies an attribute of
> descripcion and the featureType definition is:
> DefaultFeatureType [name=puntos ,
> namespace=http://www.openplans.org/topp ,
> abstract=false , types=(DefaultAttributeType
> [name=the_geom , type=class
> com.vividsolutions.jts.geom.Point , nillable=true,
> min=1, max=1],)]
> </ServiceException>
> </ServiceExceptionReport>
>
> Here is the SLD:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <StyledLayerDescriptor version="1.0.0"
> xsi:schemaLocation="http://www.opengis.net/sld
> StyledLayerDescriptor.xsd"
> xmlns="http://www.opengis.net/sld"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <!-- a named layer is the basic building block of an
> sld document -->
> <NamedLayer><Name>normal</Name>
> <UserStyle>
>     <!-- again they have names, titles and abstracts
> -->
>
>   <Title>A boring default style</Title>
>   <Abstract>A sample style that just prints out a
> black line for everything</Abstract>
>     <!-- FeatureTypeStyles describe how to render
> different features -->
>     <!-- a feature type for polygons -->
>     <FeatureTypeStyle>
>       <FeatureTypeName>Feature</FeatureTypeName>
>       <Rule>
>         <!-- like a linesymbolizer but with a fill too
> -->
>         <PointSymbolizer>
>        <Graphic>
>         <Mark>
>         <WellKnownName>circle</WellKnownName>
>         <Fill>
>         <CssParameter
> name="fill">#ff0000</CssParameter>
>         </Fill></Mark><Size>15.0</Size></Graphic>
>         </PointSymbolizer>
>         <TextSymbolizer>
>             <Label>
>
> <ogc:PropertyName>description</ogc:PropertyName>
>            </Label>
>         </TextSymbolizer>
>       </Rule>
>     </FeatureTypeStyle>
> </UserStyle>
> </NamedLayer>
> </StyledLayerDescriptor>
>
>
>
>
>
> I have been able to see the labels in older releases
> ...so I dont know if this is a bug or if I have ti
> define correctly the featuretype.
>
> Thanks in advance.
>
> Michael
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration
> Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>




----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users