Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Shapefiles and sld:ExternalGraphic

Hmmm,


I just tried RC4 on both macintosh and windows and was able to show the icon without difficulty. Here is the full SLD document that I used:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld"; xmlns:ogc="http://www.opengis.net/ogc"; xmlns:gml="http:// www.opengis.net/gml" version="1.0.0">
    <sld:UserLayer>
        <sld:LayerFeatureConstraints>
            <sld:FeatureTypeConstraint/>
        </sld:LayerFeatureConstraints>
        <sld:UserStyle>
            <sld:Name>Default Styler</sld:Name>
            <sld:Title>Default Styler</sld:Title>
            <sld:Abstract></sld:Abstract>
            <sld:FeatureTypeStyle>
                <sld:Name>simple</sld:Name>
                <sld:Title>title</sld:Title>
                <sld:Abstract>abstract</sld:Abstract>
                <sld:FeatureTypeName>bc_hospitals</sld:FeatureTypeName>
<sld:SemanticTypeIdentifier>generic:geometry</ sld:SemanticTypeIdentifier> <sld:SemanticTypeIdentifier>simple</ sld:SemanticTypeIdentifier>
                <sld:Rule>
                    <sld:Name>name</sld:Name>
                    <sld:Title>title</sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
<sld:MaxScaleDenominator>1.7976931348623157E308</ sld:MaxScaleDenominator>
                    <sld:PointSymbolizer>
                        <sld:Graphic>
                            <sld:ExternalGraphic>
<sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:type="simple" xlink:href="file:/C:/Picture 8.gif"/>
                                <sld:Format>image/gif</sld:Format>
                            </sld:ExternalGraphic>
                            <sld:Opacity>
                                <ogc:Literal>1.0</ogc:Literal>
                            </sld:Opacity>
                            <sld:Size>
                                <ogc:Literal>6</ogc:Literal>
                            </sld:Size>
                            <sld:Rotation>
                                <ogc:Literal>0.0</ogc:Literal>
                            </sld:Rotation>
                        </sld:Graphic>
                    </sld:PointSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

Jesse

On 3-Nov-06, at 1:30 AM, Schneider, Michael wrote:

Hi,

I'm using uDIG 1.1 RC4 and in my program I create a shapefile of type MultiPoint (shape type 8). Using this shapefile with uDIG works fine as long as I use a sld file with sld:Mark: All of my about 50 points are shown.

But when I try to use a sld file with sld:ExternalGraphic only 1 of those is shown although more than 1 are in the range of the viewport. When that one currently shown is not in the viewport anymore (because of panning or zooming in) another one is shown. But as I said always only 1 at a time is displayed.

Here are the diffs of the two sld files:

Vergleichen von (<)D:\Projekte\uDIG\data\pin.sld (2310l Byte)
 mit (>)D:\Projekte\uDIG\data\hits.sld (3959l Byte)

25,28c25,55
<                             <sld:ExternalGraphic>
< <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:type="simple" xlink:href="file:/D:/Projekte/uDIG/data/pin.gif"/>

<                                 <sld:Format>image/gif</sld:Format>
<                             </sld:ExternalGraphic>
---
>                             <sld:Mark>
> <sld:WellKnownName>x</ sld:WellKnownName>
>                                 <sld:Fill>
>                                     <sld:CssParameter name="fill">
> <ogc:Literal>#FF0000</ ogc:Literal>
>                                     </sld:CssParameter>
> <sld:CssParameter name="fill- opacity"> > <ogc:Literal>0.75</ ogc:Literal>
>                                     </sld:CssParameter>
>                                 </sld:Fill>
>                                 <sld:Stroke>
>                                     <sld:CssParameter name="stroke">
> <ogc:Literal>#000000</ ogc:Literal>
>                                     </sld:CssParameter>
> <sld:CssParameter name="stroke-linecap"> > <ogc:Literal>butt</ ogc:Literal>
>                                     </sld:CssParameter>
> <sld:CssParameter name="stroke-linejoin"> > <ogc:Literal>miter</ ogc:Literal>
>                                     </sld:CssParameter>
> <sld:CssParameter name="stroke-opacity"> > <ogc:Literal>1.0</ ogc:Literal>
>                                     </sld:CssParameter>
> <sld:CssParameter name="stroke-width"> > <ogc:Literal>2.0</ ogc:Literal>
>                                     </sld:CssParameter>
> <sld:CssParameter name="stroke-dashoffset"> > <ogc:Literal>0.0</ ogc:Literal>
>                                     </sld:CssParameter>
>                                 </sld:Stroke>
>                             </sld:Mark>
33c60
<                                 <ogc:Literal>75.0</ogc:Literal>
---
>                                 <ogc:Literal>20.0</ogc:Literal>

Any hints where I do something wrong?

Cheers
  Michael

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top