Re: [Geoserver-users] help with SLD
Ok Christian, is right, the SLd that you send work, i mean, it dont present error, but is not doing that i want, i need that the streets's labels beens showed following the curves of the streets, but this solution are showing only the lines not the label, or i got something wrong with my layer, i'll send it to you that you verify it, or i got something wrong with my geoserver, i dont know, i am only an amateur in this question please help me, tell me what software do you use to get all thats error, thanks, here i send you the shapefile of the streets of my project, thanks a lot. cmaul christian.m...@dse.vic.gov.au escribió: Hi, that is the SLD that works in geoserver 2.3.3. At the bottom. But first please read what was wrong with it, as this may to help you to help yourself next time. The editor complained first about the VendorOption tag. Unfortunately XML error messages in editors or geoserver are not very precise. So it pays to look as well at the tag before as this may be the reason: Here it is the case: sld:Halo sld:Radius ogc:Literal1.5/ogc:Literal /sld:Radius sld:Fill sld:CssParameter name=fill#00/sld:CssParameter /sld:Fill /sld:Halo The fill parameter is part of the Halo. On its own geoserver does not know what to do with it, so the closing /Halo tag needs to be after /sld:Fill not after the radius. So taking out the vendorOption would have resulted in complaining about the sld:TextSymbolizer and that should have prompted you to say: Hold on there must be something wrong before that Next problem: It is not sld:Literal, it is ogc:Literal. Literal is a tag from a different namespace. Next problem, where it is again complaining about the FOLLOWING tag i.e. sld:Font not about the offending tag. sld:Label ogc:PropertyNamenombre/ogc:PropertyName /sld:Label The label ends after the String you are using as label. Font is a subtag of sld:TextSymbolizer. Essentially they come in the order how, what , which font, where, halo, Fill. All these tags are on the same level. So closing the /sld:Label after the font does not work, although the XML is well formed. You have then three tags which do not have any content. And geoserver complains about them as well. Rightfully I would say. Why do you have placement tags when you do not say where. sld:LabelPlacement sld:LinePlacement / /sld:LabelPlacement On second thoughts the complaint may actually be because of the required order of the tags. Line 506 - 514 from the 1.0.0 schema: xsd:extension base=sld:SymbolizerType xsd:sequence xsd:element ref=sld:Geometry minOccurs=0/ xsd:element ref=sld:Label minOccurs=0/ xsd:element ref=sld:Font minOccurs=0/ xsd:element ref=sld:LabelPlacement minOccurs=0/ xsd:element ref=sld:Halo minOccurs=0/ xsd:element ref=sld:Fill minOccurs=0/ /xsd:sequence So the schema says: this must be your order. And that is why the vendorOptions need to come last. Please note; There is a difference between the Fill of the entire Labeling and the fill of the halo, I didn't know what you want and assumed the halo below. Now the sld that works (at least on my geoserver): ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; 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:NameDefault Styler/sld:Name sld:Title/ sld:FeatureTypeStyle sld:Namesimple/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:SemanticTypeIdentifiergeneric:geometry/sld:SemanticTypeIdentifier sld:SemanticTypeIdentifiersimple/sld:SemanticTypeIdentifier sld:Rule sld:LineSymbolizer sld:Stroke sld:CssParameter name=stroke#D95F02/sld:CssParameter /sld:Stroke /sld:LineSymbolizer sld:TextSymbolizer sld:Label ogc:PropertyNamenombre/ogc:PropertyName /sld:Label sld:Font sld:CssParameter name=font-familyArial/sld:CssParameter sld:CssParameter name=font-size12.0/sld:CssParameter sld:CssParameter name=font-stylenormal/sld:CssParameter sld:CssParameter name=font-weightnormal/sld:CssParameter
Re: [Geoserver-users] help with SLD
hey, i have been solved the problem with udig and with some tips that you gave me Christian, but only rest a problem my shapefile of dtreets have no all the names of the street and the solution that i have working only work when the scale is less than 1:71.038 and i need it working in some other scales, how do i implement that? thanks regards //-- ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; 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:Nameroads/sld:Name sld:Title/ sld:FeatureTypeStyle sld:Namegroup 0/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:SemanticTypeIdentifiergeneric:geometry/sld:SemanticTypeIdentifier sld:SemanticTypeIdentifiersimple/sld:SemanticTypeIdentifier sld:Rule sld:Namedefault rule/sld:Name sld:LineSymbolizer sld:Stroke sld:CssParameter name=stroke-width2.5/sld:CssParameter /sld:Stroke /sld:LineSymbolizer sld:TextSymbolizer sld:Label ogc:PropertyNamenombre/ogc:PropertyName /sld:Label sld:Font sld:CssParameter name=font-familyArial/sld:CssParameter sld:CssParameter name=font-size12.0/sld:CssParameter sld:CssParameter name=font-stylenormal/sld:CssParameter sld:CssParameter name=font-weightnormal/sld:CssParameter /sld:Font sld:LabelPlacement sld:PointPlacement sld:AnchorPoint sld:AnchorPointX0.0/sld:AnchorPointX sld:AnchorPointY0.5/sld:AnchorPointY /sld:AnchorPoint /sld:PointPlacement /sld:LabelPlacement sld:Halo sld:Radius1.5/sld:Radius sld:Fill sld:CssParameter name=fill#FF/sld:CssParameter /sld:Fill /sld:Halo sld:Priority500/sld:Priority sld:VendorOption name=followLinetrue/sld:VendorOption sld:VendorOption name=repeat250/sld:VendorOption sld:VendorOption name=groupyes/sld:VendorOption sld:VendorOption name=maxDisplacement100/sld:VendorOption /sld:TextSymbolizer /sld:Rule sld:Rule sld:NameNew Rule/sld:Name sld:LineSymbolizer sld:Stroke sld:CssParameter name=stroke#FF/sld:CssParameter sld:CssParameter name=stroke-width2.0/sld:CssParameter /sld:Stroke /sld:LineSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:UserLayer /sld:StyledLayerDescriptor //--- El 30/08/13 18:02, isla...@infomed.sld.cu escribió: Ok Christian, is right, the SLd that you send work, i mean, it dont present error, but is not doing that i want, i need that the streets's labels beens showed following the curves of the streets, but this solution are showing only the lines not the label, or i got something wrong with my layer, i'll send it to you that you verify it, or i got something wrong with my geoserver, i dont know, i am only an amateur in this question please help me, tell me what software do you use to get all thats error, thanks, here i send you the shapefile of the streets of my project, thanks a lot. cmaul christian.m...@dse.vic.gov.au escribió: Hi, that is the SLD that works in geoserver 2.3.3. At the bottom. But first please read what was wrong with it, as this may to help you to help yourself next time. The editor complained first about the VendorOption tag. Unfortunately XML error messages in editors or geoserver are not very precise. So it pays to look as well at the tag before as this may be the reason: Here it is the case: sld:Halo sld:Radius ogc:Literal1.5/ogc:Literal /sld:Radius sld:Fill sld:CssParameter name=fill#00/sld:CssParameter /sld:Fill /sld:Halo The fill parameter is part of the Halo. On its own geoserver does not
Re: [Geoserver-users] help with SLD
El 28/08/13 06:58, cmaul escribió: Well, throw the sld:VendorOptions/ out check whether it works and put them back one by one until it crashes I dont understan what do you want that i do, please explain better, i remove sld: of the VerdorOptions, if that what you want? of that way neither works. here are the SLD. regards ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; 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:NameDefault Styler/sld:Name sld:Title/ sld:FeatureTypeStyle sld:Namesimple/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:SemanticTypeIdentifiergeneric:geometry/sld:SemanticTypeIdentifier sld:SemanticTypeIdentifiersimple/sld:SemanticTypeIdentifier sld:Rule sld:LineSymbolizer sld:Stroke sld:CssParameter name=stroke#D95F02/sld:CssParameter /sld:Stroke /sld:LineSymbolizer sld:TextSymbolizer sld:Label ogc:PropertyNamenombre/ogc:PropertyName sld:Font sld:CssParameter name=font-familyArial/sld:CssParameter sld:CssParameter name=font-size12.0/sld:CssParameter sld:CssParameter name=font-stylenormal/sld:CssParameter sld:CssParameter name=font-weightnormal/sld:CssParameter /sld:Font /sld:Label sld:Halo sld:Radius sld:Literal1.5/sld:Literal /sld:Radius /sld:Halo sld:Fill sld:CssParameter name=fill#00/sld:CssParameter /sld:Fill sld:Priority500/sld:Priority VendorOption name=followLinetrue/VendorOption VendorOption name=repeat250/VendorOption VendorOption name=groupyes/VendorOption VendorOption name=maxDisplacement100/VendorOption sld:LabelPlacement sld:LinePlacement / /sld:LabelPlacement /sld:TextSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:UserLayer /sld:StyledLayerDescriptor - Dr Christian Maul Project Manager Information Services Branch Department of Sustainability and Environment Level13, Marland House, 570 Bourke Street Melbourne 3000 PO Box 500, East Melbourne Vic 3002 Telephone:+61-3-8636 2325 Telefax: +61-3-8636 2813 -- View this message in context: http://osgeo-org.1560.x6.nabble.com/help-with-SLD-tp5074614p5074678.html Sent from the GeoServer - User mailing list archive at Nabble.com. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] help with SLD
Hi, that is the SLD that works in geoserver 2.3.3. At the bottom. But first please read what was wrong with it, as this may to help you to help yourself next time. The editor complained first about the VendorOption tag. Unfortunately XML error messages in editors or geoserver are not very precise. So it pays to look as well at the tag before as this may be the reason: Here it is the case: sld:Halo sld:Radius ogc:Literal1.5/ogc:Literal /sld:Radius sld:Fill sld:CssParameter name=fill#00/sld:CssParameter /sld:Fill /sld:Halo The fill parameter is part of the Halo. On its own geoserver does not know what to do with it, so the closing /Halo tag needs to be after /sld:Fill not after the radius. So taking out the vendorOption would have resulted in complaining about the sld:TextSymbolizer and that should have prompted you to say: Hold on there must be something wrong before that Next problem: It is not sld:Literal, it is ogc:Literal. Literal is a tag from a different namespace. Next problem, where it is again complaining about the FOLLOWING tag i.e. sld:Font not about the offending tag. sld:Label ogc:PropertyNamenombre/ogc:PropertyName /sld:Label The label ends after the String you are using as label. Font is a subtag of sld:TextSymbolizer. Essentially they come in the order how, what , which font, where, halo, Fill. All these tags are on the same level. So closing the /sld:Label after the font does not work, although the XML is well formed. You have then three tags which do not have any content. And geoserver complains about them as well. Rightfully I would say. Why do you have placement tags when you do not say where. sld:LabelPlacement sld:LinePlacement / /sld:LabelPlacement On second thoughts the complaint may actually be because of the required order of the tags. Line 506 - 514 from the 1.0.0 schema: xsd:extension base=sld:SymbolizerType xsd:sequence xsd:element ref=sld:Geometry minOccurs=0/ xsd:element ref=sld:Label minOccurs=0/ xsd:element ref=sld:Font minOccurs=0/ xsd:element ref=sld:LabelPlacement minOccurs=0/ xsd:element ref=sld:Halo minOccurs=0/ xsd:element ref=sld:Fill minOccurs=0/ /xsd:sequence So the schema says: this must be your order. And that is why the vendorOptions need to come last. Please note; There is a difference between the Fill of the entire Labeling and the fill of the halo, I didn't know what you want and assumed the halo below. Now the sld that works (at least on my geoserver): ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; 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:NameDefault Styler/sld:Name sld:Title/ sld:FeatureTypeStyle sld:Namesimple/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:SemanticTypeIdentifiergeneric:geometry/sld:SemanticTypeIdentifier sld:SemanticTypeIdentifiersimple/sld:SemanticTypeIdentifier sld:Rule sld:LineSymbolizer sld:Stroke sld:CssParameter name=stroke#D95F02/sld:CssParameter /sld:Stroke /sld:LineSymbolizer sld:TextSymbolizer sld:Label ogc:PropertyNamenombre/ogc:PropertyName /sld:Label sld:Font sld:CssParameter name=font-familyArial/sld:CssParameter sld:CssParameter name=font-size12.0/sld:CssParameter sld:CssParameter name=font-stylenormal/sld:CssParameter sld:CssParameter name=font-weightnormal/sld:CssParameter /sld:Font sld:Halo sld:Radius ogc:Literal1.5/ogc:Literal /sld:Radius sld:Fill sld:CssParameter name=fill#00/sld:CssParameter /sld:Fill /sld:Halo sld:Priority500/sld:Priority VendorOption name=followLinetrue/VendorOption VendorOption name=repeat250/VendorOption VendorOption name=groupyes/VendorOption VendorOption
[Geoserver-users] help with SLD
Hi people, i need help, i found reading the geoserver help that i can use labeling, following lines, for example the name of the streets, but i copied the example to my geoserver with some changes and test it with udig and dont work, i only replace the name of my label field and add some strokes to the lines, and dont work, please somebody help me to correct this, this is the code that i use. ?xml version=1.0 encoding=UTF-8? sld:StyledLayerDescriptor xmlns=http://www.opengis.net/sld; 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:NameDefault Styler/sld:Name sld:Title/ sld:IsDefault1/sld:IsDefault sld:FeatureTypeStyle sld:Namesimple/sld:Name sld:FeatureTypeNameFeature/sld:FeatureTypeName sld:SemanticTypeIdentifiergeneric:geometry/sld:SemanticTypeIdentifier sld:SemanticTypeIdentifiersimple/sld:SemanticTypeIdentifier sld:Rule sld:LineSymbolizer sld:Geometry ogc:PropertyNamethe_geom/ogc:PropertyName /sld:Geometry sld:Stroke sld:CssParameter name=stroke-width3.0/sld:CssParameter /sld:Stroke /sld:LineSymbolizer sld:LineSymbolizer sld:Geometry ogc:PropertyNamethe_geom/ogc:PropertyName /sld:Geometry sld:Stroke sld:CssParameter name=stroke#FF/sld:CssParameter sld:CssParameter name=stroke-linecapsquare/sld:CssParameter sld:CssParameter name=stroke-width1.5/sld:CssParameter /sld:Stroke /sld:LineSymbolizer sld:TextSymbolizer sld:Label ogc:PropertyNamenombre/ogc:PropertyName /sld:Label sld:Font sld:CssParameter name=font-familyArial/sld:CssParameter sld:CssParameter name=font-size12.0/sld:CssParameter sld:CssParameter name=font-stylenormal/sld:CssParameter sld:CssParameter name=font-weightnormal/sld:CssParameter /sld:Font sld:LabelPlacement sld:LinePlacement sld:PerpendicularOffset10.0/sld:PerpendicularOffset /sld:LinePlacement /sld:LabelPlacement sld:Fill sld:CssParameter name=fill#00/sld:CssParameter /sld:Fill sld:VendorOption name=spaceAround2/sld:VendorOption sld:VendorOption name=groupyes/sld:VendorOption sld:VendorOption name=followLinetrue/sld:VendorOption /sld:TextSymbolizer /sld:Rule /sld:FeatureTypeStyle /sld:UserStyle /sld:UserLayer /sld:StyledLayerDescriptor This message was sent using IMP, the Internet Messaging Program. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] help with SLD
El 28/08/13 03:39, cmaul escribió: Hello, My xml-editor tells me; E [Xerces] cvc-complex-type.2.4.d: Invalid content was found starting with element 'sld:VendorOption'. No child element is expected at this point. Cheers christian Thanks christian but what did you sugest, thanks anyway for the answer - Dr Christian Maul Project Manager Information Services Branch Department of Sustainability and Environment Level13, Marland House, 570 Bourke Street Melbourne 3000 PO Box 500, East Melbourne Vic 3002 Telephone:+61-3-8636 2325 Telefax: +61-3-8636 2813 -- View this message in context: http://osgeo-org.1560.x6.nabble.com/help-with-SLD-tp5074614p5074665.html Sent from the GeoServer - User mailing list archive at Nabble.com. -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users