[Geoserver-users] FILE SLD in URL(WMS GETMAP) and POLYGON DON'T WORK

Hello,

I would wish to be able to draw a polygon on the layer “states” of
geoserver.
I chose the solution of connection SLD with a file .sld in the URL.
Here the file sld but only the symbolization of the "population" appears and
not the polygon.
I does not understand why the "gml" is not taken into account
Thank you for your assistance
  
L'URL:
http://127.0.0.1:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&sld=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&Format=application/openlayers&request=GetMap&layers=topp:states&width=800&height=317&srs=EPSG:4326

FILE SLD:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:integeo="http://www.integeo.com"
version="1.0.0">

   <sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>
  
<sld:UserLayer>
      <sld:Name>Inline</sld:Name>
      <sld:InlineFeature>
        <sld:FeatureCollection>
          <sld:featureMember>
            <polygonProperty>
               <gml:Polygon srsName="4326">
                <gml:outerBoundaryIs>
                  <gml:LinearRing>
                    <gml:coordinates>-122.32710,47.74346 -122.11472,47.73814
-122.23523,47.56903 -122.32710,47.74346 </gml:coordinates>
                  </gml:LinearRing>
                </gml:outerBoundaryIs>
              </gml:Polygon>
            </polygonProperty>
          </sld:featureMember>
        </sld:FeatureCollection>
      </sld:InlineFeature>
      <sld:LayerFeatureConstraints>
        <sld:FeatureTypeConstraint></sld:FeatureTypeConstraint>
      </sld:LayerFeatureConstraints>
      <sld:UserStyle>
        <sld:Name>test style</sld:Name>
        <sld:FeatureTypeStyle>
          <sld:Rule>
            <sld:PolygonSymbolizer>
              <sld:Fill>
                <sld:CssParameter name="fill">
                  <ogc:Literal>#FF0000</ogc:Literal>
                </sld:CssParameter>
              </sld:Fill>
            </sld:PolygonSymbolizer>
          </sld:Rule>
        </sld:FeatureTypeStyle>
      </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>
--
View this message in context: http://www.nabble.com/FILE-SLD-in-URL(WMS-GETMAP)-and-POLYGON-DON'T-WORK-tf4474884.html#a12758771
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Pouldu,

You need to remove the "layers=topp:states" parameter from your request.
The reason being that if specified, only the style that matches that
name will be rendered. Removing it causes all teh layers from your sld
to be rendered.

-Justin

Pouldu wrote:

Hello,

I would wish to be able to draw a polygon on the layer “states” of
geoserver.
I chose the solution of connection SLD with a file .sld in the URL.
Here the file sld but only the symbolization of the "population" appears and
not the polygon.
I does not understand why the "gml" is not taken into account
Thank you for your assistance
  
L'URL:
http://127.0.0.1:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&sld=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&Format=application/openlayers&request=GetMap&layers=topp:states&width=800&height=317&srs=EPSG:4326

FILE SLD:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:integeo="http://www.integeo.com"
version="1.0.0">

   <sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>
  
<sld:UserLayer>
      <sld:Name>Inline</sld:Name>
      <sld:InlineFeature>
        <sld:FeatureCollection>
          <sld:featureMember>
            <polygonProperty>
               <gml:Polygon srsName="4326">
                <gml:outerBoundaryIs>
                  <gml:LinearRing>
                    <gml:coordinates>-122.32710,47.74346 -122.11472,47.73814
-122.23523,47.56903 -122.32710,47.74346 </gml:coordinates>
                  </gml:LinearRing>
                </gml:outerBoundaryIs>
              </gml:Polygon>
            </polygonProperty>
          </sld:featureMember>
        </sld:FeatureCollection>
      </sld:InlineFeature>
      <sld:LayerFeatureConstraints>
        <sld:FeatureTypeConstraint></sld:FeatureTypeConstraint>
      </sld:LayerFeatureConstraints>
      <sld:UserStyle>
        <sld:Name>test style</sld:Name>
        <sld:FeatureTypeStyle>
          <sld:Rule>
            <sld:PolygonSymbolizer>
              <sld:Fill>
                <sld:CssParameter name="fill">
                  <ogc:Literal>#FF0000</ogc:Literal>
                </sld:CssParameter>
              </sld:Fill>
            </sld:PolygonSymbolizer>
          </sld:Rule>
        </sld:FeatureTypeStyle>
      </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Sorry, I was mistaken in the BBOX.
Finally operation is correct with this URL:

http://localhost:8080/geoserver/wms?SERVICE=WMS&Format=application/openlayers&HEIGHT=480&SLD=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=640&BBOX=-122.40632920964042,47.51843407712561,-122.06545788004654,47.77408757432104&SRS=EPSG:4326&VERSION=1.1.1

On the other hand as louse underlines it, I tried to remove the name of the
layer for which becomes generic but one is in error like this:

<sld:NamedLayer>
    <sld:Name></sld:Name>
    <sld:NamedStyle>
      <sld:Name></sld:Name>
    </sld:NamedStyle>
   </sld:NamedLayer>

Justin, has which place must one remove the name of the layer?

Thank you
Hervé

Continuum-3 wrote:

Hi Pouldu,

You need to remove the "layers=topp:states" parameter from your request.
The reason being that if specified, only the style that matches that
name will be rendered. Removing it causes all teh layers from your sld
to be rendered.

-Justin

Pouldu wrote:

Hello,

I would wish to be able to draw a polygon on the layer “states” of
geoserver.
I chose the solution of connection SLD with a file .sld in the URL.
Here the file sld but only the symbolization of the "population" appears
and
not the polygon.
I does not understand why the "gml" is not taken into account
Thank you for your assistance
  
L'URL:
http://127.0.0.1:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&sld=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&Format=application/openlayers&request=GetMap&layers=topp:states&width=800&height=317&srs=EPSG:4326

FILE SLD:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:integeo="http://www.integeo.com"
version="1.0.0">

   <sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>
  
<sld:UserLayer>
      <sld:Name>Inline</sld:Name>
      <sld:InlineFeature>
        <sld:FeatureCollection>
          <sld:featureMember>
            <polygonProperty>
               <gml:Polygon srsName="4326">
                <gml:outerBoundaryIs>
                  <gml:LinearRing>
                    <gml:coordinates>-122.32710,47.74346 -122.11472,47.73814
-122.23523,47.56903 -122.32710,47.74346 </gml:coordinates>
                  </gml:LinearRing>
                </gml:outerBoundaryIs>
              </gml:Polygon>
            </polygonProperty>
          </sld:featureMember>
        </sld:FeatureCollection>
      </sld:InlineFeature>
      <sld:LayerFeatureConstraints>
        <sld:FeatureTypeConstraint></sld:FeatureTypeConstraint>
      </sld:LayerFeatureConstraints>
      <sld:UserStyle>
        <sld:Name>test style</sld:Name>
        <sld:FeatureTypeStyle>
          <sld:Rule>
            <sld:PolygonSymbolizer>
              <sld:Fill>
                <sld:CssParameter name="fill">
                  <ogc:Literal>#FF0000</ogc:Literal>
                </sld:CssParameter>
              </sld:Fill>
            </sld:PolygonSymbolizer>
          </sld:Rule>
        </sld:FeatureTypeStyle>
      </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/FILE-SLD-in-URL(WMS-GETMAP)-and-POLYGON-DON'T-WORK-tf4474884.html#a12771561
Sent from the GeoServer - User mailing list archive at Nabble.com.

Pouldu ha scritto:

Sorry, I was mistaken in the BBOX.
Finally operation is correct with this URL:

http://localhost:8080/geoserver/wms?SERVICE=WMS&Format=application/openlayers&HEIGHT=480&SLD=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=640&BBOX=-122.40632920964042,47.51843407712561,-122.06545788004654,47.77408757432104&SRS=EPSG:4326&VERSION=1.1.1

On the other hand as louse underlines it, I tried to remove the name of the
layer for which becomes generic but one is in error like this:

<sld:NamedLayer>
    <sld:Name></sld:Name>
    <sld:NamedStyle>
      <sld:Name></sld:Name>
    </sld:NamedStyle>
   </sld:NamedLayer>

Justin, has which place must one remove the name of the layer?

Only in the GET request, the SLD must be complete.
Cheers
Andrea

I let us répons itself with myself:
By removing this of file SLD:

<sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>

The red triangle appears without the layer and is independent.
My objective is to create a drawing layer without using Postgis which one
can make apparaitre or not.

thank you and Afflicted for my disastrous English

Pouldu wrote:

Sorry, I was mistaken in the BBOX.
Finally operation is correct with this URL:

http://localhost:8080/geoserver/wms?SERVICE=WMS&Format=application/openlayers&HEIGHT=480&SLD=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=640&BBOX=-122.40632920964042,47.51843407712561,-122.06545788004654,47.77408757432104&SRS=EPSG:4326&VERSION=1.1.1

On the other hand as louse underlines it, I tried to remove the name of
the layer for which becomes generic but one is in error like this:

<sld:NamedLayer>
    <sld:Name></sld:Name>
    <sld:NamedStyle>
      <sld:Name></sld:Name>
    </sld:NamedStyle>
   </sld:NamedLayer>

Justin, has which place must one remove the name of the layer?

Thank you
Hervé

Continuum-3 wrote:

Hi Pouldu,

You need to remove the "layers=topp:states" parameter from your request.
The reason being that if specified, only the style that matches that
name will be rendered. Removing it causes all teh layers from your sld
to be rendered.

-Justin

Pouldu wrote:

Hello,

I would wish to be able to draw a polygon on the layer “states” of
geoserver.
I chose the solution of connection SLD with a file .sld in the URL.
Here the file sld but only the symbolization of the "population" appears
and
not the polygon.
I does not understand why the "gml" is not taken into account
Thank you for your assistance
  
L'URL:
http://127.0.0.1:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&sld=http%3A%2F%2Flocalhost%2FCURL%2Fstate_wms.xml&Format=application/openlayers&request=GetMap&layers=topp:states&width=800&height=317&srs=EPSG:4326

FILE SLD:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:integeo="http://www.integeo.com"
version="1.0.0">

   <sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>
  
<sld:UserLayer>
      <sld:Name>Inline</sld:Name>
      <sld:InlineFeature>
        <sld:FeatureCollection>
          <sld:featureMember>
            <polygonProperty>
               <gml:Polygon srsName="4326">
                <gml:outerBoundaryIs>
                  <gml:LinearRing>
                    <gml:coordinates>-122.32710,47.74346 -122.11472,47.73814
-122.23523,47.56903 -122.32710,47.74346 </gml:coordinates>
                  </gml:LinearRing>
                </gml:outerBoundaryIs>
              </gml:Polygon>
            </polygonProperty>
          </sld:featureMember>
        </sld:FeatureCollection>
      </sld:InlineFeature>
      <sld:LayerFeatureConstraints>
        <sld:FeatureTypeConstraint></sld:FeatureTypeConstraint>
      </sld:LayerFeatureConstraints>
      <sld:UserStyle>
        <sld:Name>test style</sld:Name>
        <sld:FeatureTypeStyle>
          <sld:Rule>
            <sld:PolygonSymbolizer>
              <sld:Fill>
                <sld:CssParameter name="fill">
                  <ogc:Literal>#FF0000</ogc:Literal>
                </sld:CssParameter>
              </sld:Fill>
            </sld:PolygonSymbolizer>
          </sld:Rule>
        </sld:FeatureTypeStyle>
      </sld:UserStyle>
    </sld:UserLayer>
</sld:StyledLayerDescriptor>

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/FILE-SLD-in-URL(WMS-GETMAP)-and-POLYGON-DON'T-WORK-tf4474884.html#a12771612
Sent from the GeoServer - User mailing list archive at Nabble.com.

Pouldu ha scritto:

I let us répons itself with myself:
By removing this of file SLD:

<sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>

The red triangle appears without the layer and is independent.
My objective is to create a drawing layer without using Postgis which one
can make apparaitre or not.

I would like to point out that this sort of thing
can also be done directly in the browser, if you
are playing with a web app. Clients such as OpenLayers
allow you to perform vector drawing directly inside the browser
without any collaboration from the server.

Cheers
Andrea

Andrea, completely of agreement.
The problem is the impression of pdf for example.
By using OpenLayers, for an impression in a document pdf, it is necessary to
export the drawings towards the server.
The applications with javascript it is well, but the impressions are very
important in the SIG Web.
It is perhaps possible thanks to Geoserver 1.5.2 and Openlayer to leave
documents pdf including the drawings. I do not know.
For example it is impossible to print the result of the library js
graphic.js.
Cartoweb uses jsgraphic.js and converts the drawings in layers with Postgis.
In a preceding application, I made the drawing with JsGraphic.
I sent the coordinates of the points to the server and redrew the whole with
fpdf. Ouf!!

aaime wrote:

Pouldu ha scritto:

I let us répons itself with myself:
By removing this of file SLD:

<sld:NamedLayer>
    <sld:Name>topp:states</sld:Name>
    <sld:NamedStyle>
      <sld:Name>population</sld:Name>
    </sld:NamedStyle>
  </sld:NamedLayer>

The red triangle appears without the layer and is independent.
My objective is to create a drawing layer without using Postgis which one
can make apparaitre or not.

I would like to point out that this sort of thing
can also be done directly in the browser, if you
are playing with a web app. Clients such as OpenLayers
allow you to perform vector drawing directly inside the browser
without any collaboration from the server.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/FILE-SLD-in-URL(WMS-GETMAP)-and-POLYGON-DON'T-WORK-tf4474884.html#a12776623
Sent from the GeoServer - User mailing list archive at Nabble.com.