Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Geos plugin struggles with some geometries #1795

Closed
gravitystorm opened this Issue Apr 2, 2013 · 4 comments

Comments

Projects
None yet
2 participants

Using a simple map style and a basic polygon, the geos plugin often fails to render the geometry.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="#ffffff">

<Style name="land">
  <Rule>
    <PolygonSymbolizer fill-opacity="1.0" fill="#000055"/>
  </Rule>
</Style>
  <Layer name="land"
  srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>land</StyleName>
    <Datasource>
       <Parameter name="type">geos</Parameter>
       <Parameter name="wkt">POLYGON((-562138.878809187 7591760.30509051,-562138.878809187 7692211.65010319,-500771.408613292 7692211.65010319,-500771.408613292 7591760.30509051,-562138.878809187 7591760.30509051))</Parameter>
    </Datasource>
  </Layer>
</Map>

Using nik2img.py -v, I can see that the extents of the layer are fine, but no feature shows up.

Step: 6 // --> Zoom to extent of all layers: "Box2d(-606793.652471,7591760.30509,-456116.634952,7692211.6501)"
[...]
- no features returned from query for layer 'land' and style 'land'

Rendering the same feature with a postgis layer (using st_geomfromtext() ) works fine.

Interestingly, changing the coordinates on the geos layer also works too. For example, the following polygon matches the above, but I've simply removed the leading "7" from all the y-coordinates.

<Parameter name="wkt">POLYGON((-562138.878809187 591760.30509051,-562138.878809187 692211.65010319,-500771.408613292 692211.65010319,-500771.408613292 591760.30509051,-562138.878809187 591760.30509051))</Parameter>

Perhaps the original coordinates are too large?

Owner

springmeyer commented Apr 2, 2013

Can you try using the CSV plugin instead?

Works fine with the CSV plugin, so this issue seems to be geos-plugin specific.

Owner

springmeyer commented Apr 15, 2013

closing, will be fixed when we remove the geos plugin.

Owner

springmeyer commented Apr 15, 2013

tracking GEOS plugin removal at #1809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment