Hi,
I'm using a postgres/postgis database to serve some layers form my geoserver
web service. All layers have a gist index on the column wkb_geometry and a
btree on the primary key geometry. All works but unfortunately, for the line
type layers, I see objects appearing only at high zoom levels. In the
default openlayers visualization I can see only some sparse features until I
zoom in the map.
Hi, I'm using a postgres/postgis database to serve some layers form my geoserver
web service. All layers have a gist index on the column wkb_geometry and a
btree on the primary key geometry. All works but unfortunately, for the line
type layers, I see objects appearing only at high zoom levels. In the
default openlayers visualization I can see only some sparse features until I
zoom in the map.
Does anyone have an advise?
Uh, that's new to me... I have a layer with 3 million road segments (whole network of Texas roads) in postgis and it displays at all
scales, using the "line" style. Of course it takes its dear time to
display when fulled zoomed out.
The things I can think of right now may be that:
- the client is timing out (browser giving up... hum... Firefox
3 waits for like 1 minute to get the map back)
- your SLD has scale dependent rules in it, like one with a
max scale denominator rule
Other than that, I can only think about data specific issues...
do you see anything in the geoserver logs? What if you rise up
the logging level to geotools_dev_logging? (warning, that will
log a ton of stuff for each rendered feature).
Thanks Andrea,
this is what geoserver writes in the log file for the layer which contains
the roads of the world:
Could not create the next feature:IllegalAttribute:
com.vividsolutions.jts.geom.LineString , but got
com.vividsolutions.jts.geom.MultiLineString
java.util.NoSuchElementException: Could not create the next
feature:IllegalAttribute: com.vividsolutions.jts.geom.LineString , but got
com.vividsolutions.jts.geom.MultiLineString
at
org.geotools.data.store.FeatureReaderIterator.next(FeatureReaderIterator.java:72)
at
org.geoserver.feature.RetypingFeatureCollection$RetypingIterator.next(RetypingFeatureCollection.java:114)
and many more....
for non line layers it writes only:
- Compressing output for mimetype: text/html
- Not compressing output for mimetype: image/png
maybe the problem is in the data...
Simo D wrote:
Hi,
I'm using a postgres/postgis database to serve some layers form my
geoserver web service. All layers have a gist index on the column
wkb_geometry and a btree on the primary key column. All works but
unfortunately, for the line type layers, I see objects appearing only at
high zoom levels. In the default openlayers visualization I can see only
some sparse features until I zoom in the map.
Thanks Andrea, this is what geoserver writes in the log file for the layer which contains
the roads of the world:
Could not create the next feature:IllegalAttribute:
com.vividsolutions.jts.geom.LineString , but got
com.vividsolutions.jts.geom.MultiLineString
java.util.NoSuchElementException: Could not create the next
feature:IllegalAttribute: com.vividsolutions.jts.geom.LineString , but got
com.vividsolutions.jts.geom.MultiLineString
at
org.geotools.data.store.FeatureReaderIterator.next(FeatureReaderIterator.java:72)
at
org.geoserver.feature.RetypingFeatureCollection$RetypingIterator.next(RetypingFeatureCollection.java:114)
and many more....
for non line layers it writes only:
- Compressing output for mimetype: text/html
- Not compressing output for mimetype: image/png
maybe the problem is in the data...
Indeed, you have metadata in geometry_columns saying "line", but the data contains multilines too... Uh, this can be handled various ways:
- you declare in the metadata the common supertype for your two types
of data, "GEOMETRY".
- we could build some tolerance into the code so that in face of
Line geometry and MultiLine metadata you get a transparent conversion,
or the opposite too, from multiline to line in case the multiline
happens to have just one element.
If you wish the latter, open a jira issue in GeoServer.
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.