[Geoserver-users] GWC rendering issues with point layers

2013-08-19 Thread Håvard Wahl Kongsgård
Hi, with default settings with GWC (v 2.3.4) , I have a rendering issue
with point layers. As shown in the screenshot (
http://kongs2.medisin.ntnu.no/tiles.png ), GWC does not render the complete
shapes of points that intersect 2 lines. Any way to fix this?


-Håvard

-- 
Håvard Wahl Kongsgård
Data Scientist
Faculty of Medicine 
Department of Mathematical Sciences
NTNU

http://havard.dbkeeping.com/
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GWC rendering issues with point layers

2013-08-19 Thread Håvard Wahl Kongsgård
... the same thing also happens when I turn on tiled in wms

-Håvard


On Mon, Aug 19, 2013 at 2:17 PM, Håvard Wahl Kongsgård 
haavard.kongsga...@gmail.com wrote:

 Hi, with default settings with GWC (v 2.3.4) , I have a rendering issue
 with point layers. As shown in the screenshot (
 http://kongs2.medisin.ntnu.no/tiles.png ), GWC does not render the
 complete shapes of points that intersect 2 lines. Any way to fix this?


 -Håvard

 --
 Håvard Wahl Kongsgård
 Data Scientist
 Faculty of Medicine 
 Department of Mathematical Sciences
 NTNU

 http://havard.dbkeeping.com/




-- 
Håvard Wahl Kongsgård
Data Scientist
Faculty of Medicine 
Department of Mathematical Sciences
NTNU

http://havard.dbkeeping.com/
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GWC rendering issues with point layers

2013-08-19 Thread Håvard Wahl Kongsgård
Ok, thanks that solved it.

-Håvard


On Mon, Aug 19, 2013 at 4:30 PM, Andrea Aime
andrea.a...@geo-solutions.itwrote:

 On Mon, Aug 19, 2013 at 4:16 PM, Håvard Wahl Kongsgård 
 haavard.kongsga...@gmail.com wrote:

 ... the same thing also happens when I turn on tiled in wms


 This happens because GeoServer cannot predict how big the circles will
 become.
 In GWC setup a gutter large enough to capture the radius of biggest
 possible circle, in WMS add buffer=x where
 x is again the size, in pixels, of the radius of largest possible circle

 Cheers
 Andrea

 --
 ==
 Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
 information.
 ==

 Ing. Andrea Aime
 @geowolf
 Technical Lead

 GeoSolutions S.A.S.
 Via Poggio alle Viti 1187
 55054  Massarosa (LU)
 Italy
 phone: +39 0584 962313
 fax: +39 0584 1660272
 mob: +39  339 8844549

 http://www.geo-solutions.it
 http://twitter.com/geosolutions_it

 ---




-- 
Håvard Wahl Kongsgård
Data Scientist
Faculty of Medicine 
Department of Mathematical Sciences
NTNU

http://havard.dbkeeping.com/
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Disperse Markers in geoserver/openlayers

2011-10-31 Thread Håvard Wahl Kongsgård
  Size
ogc:Literal10/ogc:Literal
  /Size
/Graphic
LabelPlacement
  PointPlacement
AnchorPoint
  AnchorPointX0.5/AnchorPointX
  AnchorPointY0.5/AnchorPointY
/AnchorPoint
  /PointPlacement
/LabelPlacement
VendorOption name=maxDisplacement16/VendorOption
  /TextSymbolizer


/Rule
  /FeatureTypeStyle
/UserStyle
  /NamedLayer
/StyledLayerDescriptor


2011/9/22 Andrea Aime andrea.a...@geo-solutions.it:
 2011/9/22 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com:
 Hi, I have a problem with overlapping points(identical XY). Googling I
 found that Arcgis has a useful tool Disperse Markers which expands
 clustered(overlapping points)
 http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1313pid=1306topicname=Disperse_Markers_(Cartography)
 . Is a similar feature available in geoserver/openlayers for expanding
 point clusters on the fly? The math behind it must be very simple, so
 the alternative is to created a new geom in postigs with expanded
 clusters.

 There is a little trick you can employ. Text symbolizers in GeoServer
 can be associated
 to a graphic, which in the original intention was the road plate, a
 background graphic
 that would be moved along with the label

 Now, if your label is empty space you can use label displacement to
 actually move away
 the points in a controlled way.
 The downside if you want is that if a new position cannot be found,
 not even by moving
 it around within the specified distance, the point won't be painted at all.

 Here is an example map with cities:
 http://demo1.geo-solutions.it/playground/GeoSolutions/wms?LAYERS=GeoSolutions%3AcitiesSTYLES=starsFORMAT=image%2FpngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapEXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-0.59257250976506,38.661416015626,24.887332275391,51.617299804688WIDTH=649HEIGHT=330

 and here is the same with the trick above:
 http://demo1.geo-solutions.it/playground/GeoSolutions/wms?LAYERS=GeoSolutions%3AcitiesSTYLES=displaceFORMAT=image%2FpngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapEXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-0.59257250976506,38.661416015626,24.887332275391,51.617299804688WIDTH=649HEIGHT=330

 I guess you'll need to play a bit with it to get it right, but it may work.
 The full style is here:
 http://demo1.geo-solutions.it/playground/styles/displace.sld

 Cheers
 Andrea


 --
 ---
 Ing. Andrea Aime
 GeoSolutions S.A.S.
 Tech lead

 Via Poggio alle Viti 1187
 55054  Massarosa (LU)
 Italy

 phone: +39 0584 962313
 fax:      +39 0584 962313

 http://www.geo-solutions.it
 http://geo-solutions.blogspot.com/
 http://www.youtube.com/user/GeoSolutionsIT
 http://www.linkedin.com/in/andreaaime
 http://twitter.com/geowolf

 ---


--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Disperse Markers in geoserver/openlayers

2011-09-23 Thread Håvard Wahl Kongsgård
Thanks, but how easy would it be to use the two methods
together(clustering and declustering) when zooming to different
levels(like Spatialkey.com) ? Maybe by using multiple levels?

Also, what about on the fly cubic interpolation of point values.
It's not very computer intensive(Spatialkey.com use that as well on
points).

-Håvard


2011/9/22 Andrea Aime andrea.a...@geo-solutions.it:
 2011/9/22 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com:
 Hi, I have a problem with overlapping points(identical XY). Googling I
 found that Arcgis has a useful tool Disperse Markers which expands
 clustered(overlapping points)
 http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1313pid=1306topicname=Disperse_Markers_(Cartography)
 . Is a similar feature available in geoserver/openlayers for expanding
 point clusters on the fly? The math behind it must be very simple, so
 the alternative is to created a new geom in postigs with expanded
 clusters.

 There is a little trick you can employ. Text symbolizers in GeoServer
 can be associated
 to a graphic, which in the original intention was the road plate, a
 background graphic
 that would be moved along with the label

 Now, if your label is empty space you can use label displacement to
 actually move away
 the points in a controlled way.
 The downside if you want is that if a new position cannot be found,
 not even by moving
 it around within the specified distance, the point won't be painted at all.

 Here is an example map with cities:
 http://demo1.geo-solutions.it/playground/GeoSolutions/wms?LAYERS=GeoSolutions%3AcitiesSTYLES=starsFORMAT=image%2FpngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapEXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-0.59257250976506,38.661416015626,24.887332275391,51.617299804688WIDTH=649HEIGHT=330

 and here is the same with the trick above:
 http://demo1.geo-solutions.it/playground/GeoSolutions/wms?LAYERS=GeoSolutions%3AcitiesSTYLES=displaceFORMAT=image%2FpngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapEXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-0.59257250976506,38.661416015626,24.887332275391,51.617299804688WIDTH=649HEIGHT=330

 I guess you'll need to play a bit with it to get it right, but it may work.
 The full style is here:
 http://demo1.geo-solutions.it/playground/styles/displace.sld

 Cheers
 Andrea


 --
 ---
 Ing. Andrea Aime
 GeoSolutions S.A.S.
 Tech lead

 Via Poggio alle Viti 1187
 55054  Massarosa (LU)
 Italy

 phone: +39 0584 962313
 fax:      +39 0584 962313

 http://www.geo-solutions.it
 http://geo-solutions.blogspot.com/
 http://www.youtube.com/user/GeoSolutionsIT
 http://www.linkedin.com/in/andreaaime
 http://twitter.com/geowolf

 ---


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Disperse Markers in geoserver/openlayers

2011-09-22 Thread Håvard Wahl Kongsgård
Hi, I have a problem with overlapping points(identical XY). Googling I
found that Arcgis has a useful tool Disperse Markers which expands
clustered(overlapping points)
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1313pid=1306topicname=Disperse_Markers_(Cartography)
. Is a similar feature available in geoserver/openlayers for expanding
point clusters on the fly? The math behind it must be very simple, so
the alternative is to created a new geom in postigs with expanded
clusters.


-- 
Håvard Wahl Kongsgård

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] WMSGetFeatureInfo filtered eliments

2011-08-30 Thread Håvard Wahl Kongsgård
Hi, with OpenLayers.Control.WMSGetFeatureInfo is it
possible to restrict elements users can selected to only filtered
elements?

The standard openlayer code in geoserver, uses map.events.register to
select only filtered elements. In the OpenLayers API it was not clear
if this was possible for WMSGetFeatureInfo?



Standard code in geoserver
               // support GetFeatureInfo
               map.events.register('click', map, function (e) {
                   document.getElementById('nodelist').innerHTML =
Loading... please wait...;
                   var params = {
                       REQUEST: GetFeatureInfo,
                       EXCEPTIONS: application/vnd.ogc.se_xml,
                       BBOX: map.getExtent().toBBOX(),
                       SERVICE: WMS,
                       VERSION: 1.1.1,
                       X: e.xy.x,
                       Y: e.xy.y,
                       INFO_FORMAT: 'text/html',
                       QUERY_LAYERS: map.layers[0].params.LAYERS,
                       FEATURE_COUNT: 50,
                       Layers: 'HUNT:eiendom_flate',
                       WIDTH: map.size.w,
                       HEIGHT: map.size.h,
                       format: format,
                       styles: map.layers[0].params.STYLES,
                       srs: map.layers[0].params.SRS};
                   // merge filters
                   if(map.layers[0].params.CQL_FILTER != null) {
                       params.cql_filter = map.layers[0].params.CQL_FILTER;
                   }
                   if(map.layers[0].params.FILTER != null) {
                       params.filter = map.layers[0].params.FILTER;
                   }
                   if(map.layers[0].params.FEATUREID) {
                       params.featureid = map.layers[0].params.FEATUREID;
                   }

OpenLayers.loadURL(http://example.com/geoserver/wms;, params, this,
setHTML, setHTML);
                   OpenLayers.Event.stop(e);
               });


simple example select example with WMSGetFeatureInfo

info = new OpenLayers.Control.WMSGetFeatureInfo({
           url: 'http://something.com:8080/geoserver/wms',
           title: 'Identify features by clicking',
           layers: [tiled],
           //hover:true,
           queryVisible: true,
           eventListeners: {
               getfeatureinfo: function(event) {

                   map.addPopup(new OpenLayers.Popup.FramedCloud(
                       chicken,
                       map.getLonLatFromPixel(event.xy),
                       null,
                       event.text,
                       null,
                       true
                   ));
                   //alert(event.text);

               }
           }

       });


--
Håvard Wahl Kongsgård



-- 
Håvard Wahl Kongsgård
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Fwd: Random colors in SLD templates

2011-08-29 Thread Håvard Wahl Kongsgård
If you can modify your data, it might make sense to just add a column of 
random values to it and reference those from the SLD - that would allow you a 
bit more control if you find that the colors need tweaking (two similar colors 
in adjacent polygons, etc.)

That would be a simple solution, in the SLD template how do I simply
set the color equal to database field value?

-Håvard

2011/8/29 David Winslow dwins...@opengeo.org:
 If I wanted to achieve such a thing in Java, I would try something along the
 lines of:

 int hash = feature.getFeatureId().hashCode();
 String colorCode = String.format(#%06x, hash  0xFF);

 I believe there is a format function exposed in GeoServer's SLD
 implementation - but I am not sure about a good SLD substitute for
 .hashCode.  If you have to, it's not hard for a Java developer to add a
 filter function.

 If you can modify your data, it might make sense to just add a column of
 random values to it and reference those from the SLD - that would allow you
 a bit more control if you find that the colors need tweaking (two similar
 colors in adjacent polygons, etc.)

 --
 David Winslow
 OpenGeo - http://opengeo.org/

 2011/8/28 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com

 Hi, I have a layer with multiple bordering polygons which needs to be
 visually separated.

 One possibility is to create a massive SLD template, defining random
 colors for specific polygons.

 However, I noticed this post

 http://osgeo-org.1803224.n2.nabble.com/Random-function-in-SLD-td6125434.html

 The problem with that approach is that polygons change colors when
 zooming, and when map tiles are enabled, polygons crossing different
 tiles have multiple colors. With SLD templates is there another way to
 do this?


 ?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
    Namedefault_polygon/Name
    UserStyle
    !-- Styles can have names, titles and abstracts --
      TitleDefault Polygon/Title
      AbstractA sample style that draws a polygon/Abstract
      !-- FeatureTypeStyles describe how to render different features --
      !-- A FeatureTypeStyle for rendering polygons --
      FeatureTypeStyle
        Rule
          Namerule1/Name
          PolygonSymbolizer
                 Fill
                   CssParameter name=fill
                     ogc:Function name=numberFormat
                       ogc:Literal'#'00/ogc:Literal
                       ogc:Mul
                         ogc:Function name=random/ogc:Function
                         ogc:Literal100/ogc:Literal
                       /ogc:Mul
                     /ogc:Function
                   /CssParameter
                   CssParameter name=fill-opacity0.7/CssParameter
                 /Fill
            Stroke
              CssParameter name=stroke#00/CssParameter
              CssParameter name=stroke-width1/CssParameter
            /Stroke
          /PolygonSymbolizer
        /Rule
      /FeatureTypeStyle
    /UserStyle
  /NamedLayer
 /StyledLayerDescriptor

 --
 Håvard Wahl Kongsgård


 --
 EMC VNX: the world's simplest storage, starting under $10K
 The only unified storage solution that offers unified management
 Up to 160% more powerful than alternatives and 25% more efficient.
 Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
 ___
 Geoserver-users mailing list
 Geoserver-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Fwd: Random colors in SLD templates

2011-08-29 Thread Håvard Wahl Kongsgård
Thanks, I tried this code

?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;
  NamedLayer
NameSimple polygon/Name
UserStyle
  TitleSLD Cook Book: Simple polygon/Title
  FeatureTypeStyle
Rule
  PolygonSymbolizer

Fill
  CssParameter name=fill
  ogc:PropertyNamecolor/ogc:PropertyName
  /CssParameter

/Fill


 Stroke
   CssParameter name=stroke#FF/CssParameter
   CssParameter name=stroke-width2/CssParameter
 /Stroke


  /PolygonSymbolizer
/Rule
  /FeatureTypeStyle
/UserStyle
  /NamedLayer
/StyledLayerDescriptor


The requested Style can not be used with this layer. The style
specifies an attribute of color and the layer is: :

What have I done wrong?

the content of color is

 color
-
 #f4b5f
 #a6be4c
 #31abb5
 #c98180
 #b1558c
 #db686c
 #672474
 #309cae
 #ddb933
 #1c9fea
 #871c67
 #4611fa
 #743229
 #5b1610
 #47ea59
 #8e341e


-Håvard

2011/8/29 David Winslow dwins...@opengeo.org:
 CssParameter
 name=fillPropertyNamethe_random_property/PropertyName/CssParameter

 There's some other nice techniques in the SLD cookbook section of the
 manual, highly recommended reading for GeoServer stylists.
 http://docs.geoserver.org/stable/en/user/styling/index.html

 --
 David Winslow
 OpenGeo - http://opengeo.org/

 2011/8/29 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com

 If you can modify your data, it might make sense to just add a column of
  random values to it and reference those from the SLD - that would allow you
  a bit more control if you find that the colors need tweaking (two similar
  colors in adjacent polygons, etc.)

 That would be a simple solution, in the SLD template how do I simply
 set the color equal to database field value?

 -Håvard

 2011/8/29 David Winslow dwins...@opengeo.org:
  If I wanted to achieve such a thing in Java, I would try something along
  the
  lines of:
 
  int hash = feature.getFeatureId().hashCode();
  String colorCode = String.format(#%06x, hash  0xFF);
 
  I believe there is a format function exposed in GeoServer's SLD
  implementation - but I am not sure about a good SLD substitute for
  .hashCode.  If you have to, it's not hard for a Java developer to add a
  filter function.
 
  If you can modify your data, it might make sense to just add a column of
  random values to it and reference those from the SLD - that would allow
  you
  a bit more control if you find that the colors need tweaking (two
  similar
  colors in adjacent polygons, etc.)
 
  --
  David Winslow
  OpenGeo - http://opengeo.org/
 
  2011/8/28 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com
 
  Hi, I have a layer with multiple bordering polygons which needs to be
  visually separated.
 
  One possibility is to create a massive SLD template, defining random
  colors for specific polygons.
 
  However, I noticed this post
 
 
  http://osgeo-org.1803224.n2.nabble.com/Random-function-in-SLD-td6125434.html
 
  The problem with that approach is that polygons change colors when
  zooming, and when map tiles are enabled, polygons crossing different
  tiles have multiple colors. With SLD templates is there another way to
  do this?
 
 
  ?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
     Namedefault_polygon/Name
     UserStyle
     !-- Styles can have names, titles and abstracts --
       TitleDefault Polygon/Title
       AbstractA sample style that draws a polygon/Abstract
       !-- FeatureTypeStyles describe how to render different features
  --
       !-- A FeatureTypeStyle for rendering polygons --
       FeatureTypeStyle
         Rule
           Namerule1/Name
           PolygonSymbolizer
                  Fill
                    CssParameter name=fill
                      ogc:Function name=numberFormat
                        ogc:Literal'#'00/ogc:Literal
                        ogc:Mul
                          ogc:Function name=random/ogc:Function
                          ogc:Literal100/ogc:Literal
                        /ogc:Mul
                      /ogc:Function
                    /CssParameter
                    CssParameter name=fill-opacity0.7/CssParameter
                  /Fill
             Stroke
               CssParameter name=stroke#00/CssParameter

Re: [Geoserver-users] Fwd: Random colors in SLD templates

2011-08-29 Thread Håvard Wahl Kongsgård
Thanks, that solved the problem.

-Håvard

2011/8/29 Andrea Aime andrea.a...@geo-solutions.it:
 2011/8/29 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com:


 The requested Style can not be used with this layer. The style
 specifies an attribute of color and the layer is: :

 What have I done wrong?

 Wild guess: you added the column to postgis on geoserver back, but
 GS does not know. Try going to the server status page and hit
 the clear button  in the resource cache row, and then try it again.

 Cheers
 Andrea



 --
 ---
 Ing. Andrea Aime
 GeoSolutions S.A.S.
 Tech lead

 Via Poggio alle Viti 1187
 55054  Massarosa (LU)
 Italy

 phone: +39 0584 962313
 fax:      +39 0584 962313

 http://www.geo-solutions.it
 http://geo-solutions.blogspot.com/
 http://www.youtube.com/user/GeoSolutionsIT
 http://www.linkedin.com/in/andreaaime
 http://twitter.com/geowolf

 --

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Random colors in SLD templates

2011-08-28 Thread Håvard Wahl Kongsgård
Hi, I have a layer with multiple bordering polygons which needs to be
visually separated.

One possibility is to create a massive SLD template, defining random
colors for specific polygons.

However, I noticed this post
http://osgeo-org.1803224.n2.nabble.com/Random-function-in-SLD-td6125434.html

The problem with that approach is that polygons change colors when
zooming, and when map tiles are enabled, polygons crossing different
tiles have multiple colors. With SLD templates is there another way to
do this?


?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
Namedefault_polygon/Name
UserStyle
!-- Styles can have names, titles and abstracts --
  TitleDefault Polygon/Title
  AbstractA sample style that draws a polygon/Abstract
  !-- FeatureTypeStyles describe how to render different features --
  !-- A FeatureTypeStyle for rendering polygons --
  FeatureTypeStyle
Rule
  Namerule1/Name
  PolygonSymbolizer
 Fill
   CssParameter name=fill
 ogc:Function name=numberFormat
   ogc:Literal'#'00/ogc:Literal
   ogc:Mul
 ogc:Function name=random/ogc:Function
 ogc:Literal100/ogc:Literal
   /ogc:Mul
 /ogc:Function
   /CssParameter
   CssParameter name=fill-opacity0.7/CssParameter
 /Fill
Stroke
  CssParameter name=stroke#00/CssParameter
  CssParameter name=stroke-width1/CssParameter
/Stroke
  /PolygonSymbolizer
/Rule
  /FeatureTypeStyle
/UserStyle
  /NamedLayer
/StyledLayerDescriptor

-- 
Håvard Wahl Kongsgård

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Writing to postgresql tables from geoserver(templates)

2011-08-26 Thread Håvard Wahl Kongsgård
Hi, I looking for a way to include a sql enabled form in the geoserver
templates. One of the fields is a value selected by
OpenLayers.Control.WMSGetFeatureInfo.

Including some PHP code would be one option, but client based java and
server based php is not an easy mix.
Is there some other way to write to a postgresql database from geoserver?

-- 
Håvard Wahl Kongsgård

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] SLD related error when previewing layers

2011-08-21 Thread Håvard Wahl Kongsgård
Manually creating style-layouts seems like the best solution for geoserver.

-Håvard

On Fri, Aug 19, 2011 at 6:50 PM, Stefan Tzeggai tzeg...@wikisquare.de wrote:
 Hi Andrea

   ogc:PropertyIsEqualTo
                ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
                ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
              /ogc:PropertyIsEqualTo
              ogc:And
                ogc:Not
                  ogc:And
                    ogc:PropertyIsEqualTo
                      ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
                      ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
                    /ogc:PropertyIsEqualTo

 that do not make sense... A = A is always true, those comparisons are useless
 extras

 Cheers
 Andrea

 They look useless from the point of boolean algebra -true ;-) But of
 course there is a good reason AtlasStyler writes that stuff into the XML
 code.

 See it like that:

 These fixed never or always true conditions represent toggles in the
 GUI. E.g. if you disable the complete labeling tab at once, AtlasStyler
 will disable the block with always false filters and not hrow your
 settings away. So when you decide later that you did actually like the
 labels, all settings like font, size, etc. are still there. This concept is

 AtlasStyler has been using such filters since version 1.0, so I am sure
 that the problem is not related. Remember:
 1. Every SLD saved with AtlasStyler is validated.. So the SLD is valid.
 2. The user created the style graphically with AtlasStyler.. During that
 process the style has been successfully rendered with Geotools.

 For faster rendering and cleaner code, AtlasStyler should really get a
 button export optimized SLD which would throw away all that stuff and
 generate cleaner SLD. (but with the disadvantage that AtlasStyler will
 not be able to restore full GUI state after loading that). I wanted to
 write such a button since months/ years.. never found the time...

 @haavard
 Send a nice mail your sample SLD, data sample, version numbers and to
 the AtlasStyler mailling list and I will try understand why it renders
 in AtlasStyler (= Geotools) and not in Geoserver (=Geotools).

 Greetings,
 Steve



 --
 wikisquare Softwareentwicklung
 Stefan Tzeggai
 Straßburger Weg 26
 53113 Bonn

 email   tzeg...@wikisquare.de
 webpage wikisquare.de
 skype   alfonx
 phone   0228 24 000 528
 mobile  0176 40 38 9559

 reclaim your net - http://tor.eff.org
 enforce privacy - http://www.pgpi.org
 pgp key id: 51B576FD - http://pgp.mit.edu

 Please note that according to the German law on data retention,
 information on every electronic information exchange with me is
 retained for a period of six months.



 --
 Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
 user administration capabilities and model configuration. Take
 the hassle out of deploying and managing Subversion and the
 tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
 ___
 Geoserver-users mailing list
 Geoserver-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] SLD related error when previewing layers

2011-08-18 Thread Håvard Wahl Kongsgård
Hi, was unable to find a good documentation of SLD layouts on google.
Do anyone know a good resource for manually creating SLD layouts?

-Håvard

2011/8/18 Andrea Aime andrea.a...@geo-solutions.it:
 2011/8/17 Håvard Wahl Kongsgård haavard.kongsga...@gmail.com:
 Hi, I have a problem with SLD layouts generated with AtlasStyler. When
 I preview the layers in geoserver, I get this error

 code=internalErrorRendering process failed java.io.IOException null
 Unable to evaulate class
 org.geotools.feature.type.AttributeDescriptorImpl in a numeric
 context.

 The error means the there is some non numeric attribute (or numeric,
 but with null values) used in some place where a number is expected.
 It's difficult to say where, the style is very long, but I see for example
 division operations that would expect numerics.

 That said, the style looks really odd, there is a number of these:

  ogc:PropertyIsEqualTo
               ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
               ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
             /ogc:PropertyIsEqualTo
             ogc:And
               ogc:Not
                 ogc:And
                   ogc:PropertyIsEqualTo
                     ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
                     ogc:LiteralALL_LABEL_CLASSES_ENABLED/ogc:Literal
                   /ogc:PropertyIsEqualTo

 that do not make sense... A = A is always true, those comparisons are useless
 extras

 Cheers
 Andrea

 --
 ---
 Ing. Andrea Aime
 GeoSolutions S.A.S.
 Tech lead

 Via Poggio alle Viti 1187
 55054  Massarosa (LU)
 Italy

 phone: +39 0584 962313
 fax:      +39 0584 962313

 http://www.geo-solutions.it
 http://geo-solutions.blogspot.com/
 http://www.youtube.com/user/GeoSolutionsIT
 http://www.linkedin.com/in/andreaaime
 http://twitter.com/geowolf

 ---

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users