[OpenLayers-Users] Highlighting Feature on KML Layer

Phil Scadden p.scadden at gns.cri.nz
Tue Oct 9 18:26:06 PDT 2012


> The features in the vector layer that I am using are polygons that 
> represent tracts of land.  I presume that because of the nature of the 
> data that it would be best to retain it as vector data.  I created the 
> vector layer and it is maintained on our web site.  I presume that it 
> would be best to keep it as vector data.  Is that correct?
>
Yes, that is "vector" rather than raster data at its source. The issue 
is how best to render it within a web application. I am assuming that it 
is authored and stored in a GIS somewhere. The question is how to get 
the data from source to web-accessible location and in format to store it.

In OL, a vector layer is data that is set directly to js client as 
vector and the JS engine renders it. Once the no. of vertices gets large 
(>500), then this is slow to transfer and slow to render.

An OGC web server stand between data sources (eg GIS stores like 
shapefile, postGIS, arcSDE, geodatabase) and the web client.
When your OL clients requests data for a BBOX from the server, a WMS 
server renders the data on the server and sends this image  (png for 
preferrence) to OL which locates it on the map. WFS servers by contrast, 
send the vector data, by default in GML to the server. However if you 
use WMS for display, then you get fast display rendering (happens on 
server) even with large data sets while when you query (eg mouse click, 
filter query etc) with WFS it only needs to send a very small amount of 
data that satisfies the query. You might want only the attribute data 
and not the vectices which makes it even quicker. Things like 
WMSGeFeaturetInfo can be configured to return say just the name 
attribute of the feature under the hovering cursor. Another mixed-mode 
method that works well with polygon data is using UTFGrid in conjunction 
WMS.

Your choice depends on host data and preference for server. We use 
arcSDE and PostGIS for data with the advantage that there is single 
master copy used by both web and GIS (no copying). We use geoserver as 
the OGC server. (http://data.gns.cri.nz/pbe is the our application but 
you need to register to use it -free- because my masters like to know 
who is downloading from it).

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121010/0afe1128/attachment.html>


More information about the Users mailing list