[OpenLayers-Users] WFS connection

Christopher Schmidt crschmidt at crschmidt.net
Thu Jul 6 22:15:03 CDT 2006


On Thu, Jul 06, 2006 at 08:19:50PM -0500, Richie Pierce wrote:
> David,
> 
>    I'm using the WMS and WFS connectors for ArcIMS as layers through
> OpenLayers.  I'm not using a .map file.  We've got every layer in our
> database (500+) running through the connectors.  I am just adding the
> layers into OpenLayers straight from the ArcIMS connectors.  I have
> built MapServer with Proj4 and SDE so I can create a map file with the
> layers I need.  I was just hoping to find a way to take advantage of our
> existing WMS and WFS since they are already available, save myself the
> time of having to build the map files.

Richie: 

I've just spent some time investigating your WFS server, and I seem to
be having some problems, some of which are related to lack of feature
support in OpenLayers, and some of which seem to be some confusion on my
part.

Most importantly is that although OpenLayers can act as a WFS client,
primarily this capability is exploited for point rendering only.
OpenLayers does not yet support polyline drawing, nor does it support
any other vector format, and this means that WFS results of LinearRings
are not supported by the WFS layer yet. I couldn't, with a cursory
attempt, find anything that appeared to be a point layer with which I
could demonstrate. 

Polyline/vector support seems to be one of the most popular features we
don't have, and it's a personal itch for me as well as being a
project-wide one for OpenLayers. So, although I don't have an exact time
schedule, I do know that it's on a list of features that we'd like to
see implemented or implement ourself, and it seems that there hare a
number community efforts to make this possible client-side, we just
haven't had the chance to get started on it yet.

Secondly, if your data is in a different projection, you'll need to
tell OpenLayers that you want to see a different projection. (In most
cases, you'll need to tell your WMS/WFS server as well.) I've set up an
example at http://openlayers.org/~crschmidt/arkansas/wfs.html which does
this: the important line is:

map = new OpenLayers.Map('map',
  {
    maxResolution:(4042952-3652558)/1000, 
    maxExtent: new OpenLayers.Bounds(355100,3652558, 802811,4042952), 
    projection: 'EPSG:26915'
  }
);

Setting the maxextent and the maxResolution (units per pixel at highest
zoom level) allows you to use the data in a different projection, and
the 'projection' param is passed through to the WFS/WMS as an SRS param.
Using these params, I am able to see that the WFS request returns data,
but that OpenLayers is unable to render it. (An example URL is:
  http://www.geostor.arkansas.gov/wfsconnector/com.esri.wfs.Esrimap?TYPENAME=ADMIN.COUNTIES_AHTD_2005-149&MAXFEATURES=10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG:26915&BBOX=455040.864,3952380.592,554981.728,4052321
)

Looking at your WMS, it seems that I can't get that working either, and
this one I'm less sure on. I tried loading it both in WGS-84 (EPSG:4326)
(example URL
http://www.geostor.arkansas.gov/wmsconnector/com.esri.wms.Esrimap?LAYERS=9&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/jpeg&SRS=EPSG:4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256
) and in EPSG:26915 (example URL
http://www.geostor.arkansas.gov/wmsconnector/com.esri.wms.Esrimap?LAYERS=9&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/jpeg&SRS=EPSG:26915&BBOX=455040.864,3952380.592,554981.728,4052321.4560000002&WIDTH=256&HEIGHT=256
). 

It seems like somewhere in here, I should be getting some data, but I
don't seem to -- I'm not sure of the reason for this, but if you want an
example of your WMS in OpenLayers, at least, I might be able to provide
it given a working URL to start with.

Hopefully this helps answer some of your questions, and I'm sorry if
OpenLayers is proving a red herring for you. We do want to make
everything you seem to want to do work, and work well, but it just
hasn't been done yet.

Thanks for your interest. I'll definitely keep you and the list informed
as the status of vector rendering progresses, so that you can be aware
of the new abilities as they become available.

-- 
Christopher Schmidt
Web Developer


More information about the Users mailing list