<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Steven,<div><br></div><div>the format reading the features is responsible for reprojection, not the layer. Have you tried supplying internalProjection and externalProjection through the formatOptions property of the protocol?</div><div><br></div><div>Is it not easier to have your WFS reproject the features for you?</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div>On Feb 3, 2010, at 10:26 AM, Steven M. Ottens wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I'm trying to access a WFS in epsg:30800, while the background layer
and all other WFS's are in epsg:4258. I've configured all WFS's using
Vector and protocol.WFS. I've set the projection in the layer
definition, and the WFS request does contain the correct epsg code, but
the coordinates are still in 4258. I checked the Vector class and
didn't see anything related to projection, am I correct in assuming
that Vector.js together with the WFS protocol doesn't support
reprojecting features? If so should I create a ticket, since WFS.js
does support it (<a class="moz-txt-link-freetext" href="http://trac.openlayers.org/ticket/1406">http://trac.openlayers.org/ticket/1406</a>)<br>
<br>
regards,<br>
Steven<br>
<br>
Configuration of the working WFS:<br>
var wfs_nl_cp = new OpenLayers.Layer.Vector(<br>
&nbsp;&nbsp;&nbsp; "The Netherlands: CP",<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1})],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; visibility: true,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection("EPSG:4258"),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; protocol: new OpenLayers.Protocol.WFS({<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; version: "1.1.0",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; srsName: "EPSG:4258",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; extractAttributes:true, <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; url:
<a class="moz-txt-link-rfc2396E" href="http://esdin.geodan.nl/fgi/Kadaster/deegree-wfs/services">"http://esdin.geodan.nl/fgi/Kadaster/deegree-wfs/services"</a>,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featurePrefix: "CP",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featureType: "CadastralParcel",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featureNS:
"urn:x-inspire:specification:gmlas:CadastralParcels:3.0",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; geometryName: "geometry",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxFeatures: "100",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sortBy: "label", //not supported<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; schema:
<a class="moz-txt-link-rfc2396E" href="http://esdin.fgi.fi/esdin/Kadaster/deegree-wfs/services?request=DescribeFeatureType&amp;version=1.1.0&amp;service=WFS&amp;typeName=CP:CadastralParcel&amp;namespace=xmlns%28xmlns:CP=urn:x-inspire:specification:gmlas:CadastralParcels:3.0%29">"http://esdin.fgi.fi/esdin/Kadaster/deegree-wfs/services?request=DescribeFeatureType&amp;version=1.1.0&amp;service=WFS&amp;typeName=CP:CadastralParcel&amp;namespace=xmlns(xmlns:CP=urn:x-inspire:specification:gmlas:CadastralParcels:3.0)"</a><br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; })<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; );<br>
and the not working WFS:<br>
&nbsp;&nbsp;&nbsp; var wfs_se_gn = new OpenLayers.Layer.Vector(<br>
&nbsp;&nbsp;&nbsp; "Sweden: GN",<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1})],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; visibility: false,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; styleMap: pointStyles,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection("EPSG:30800"),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; protocol: new OpenLayers.Protocol.WFS({<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; version: "1.1.0",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; srsName: "EPSG:30800",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; extractAttributes:true, <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; url: <a class="moz-txt-link-rfc2396E" href="http://esdin.geodan.nl/fgi/NLSS/geoserver_esdin/wfs">"http://esdin.geodan.nl/fgi/NLSS/geoserver_esdin/wfs"</a>,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featurePrefix: "esdin",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featureType: "geographicalNames",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featureNS: <a class="moz-txt-link-rfc2396E" href="http://www.metainfo.se/esdin">"http://www.metainfo.se/esdin"</a>,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; geometryName: "SHAPE",<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; schema:
<a class="moz-txt-link-rfc2396E" href="http://esdin.geodan.nl/fgi/NLSS/geoserver_esdin/wfs?&amp;request=DescribeFeatureType&amp;version=1.1.0&amp;typeName=esdin:geographicalNames">"http://esdin.geodan.nl/fgi/NLSS/geoserver_esdin/wfs?&amp;request=DescribeFeatureType&amp;version=1.1.0&amp;typeName=esdin:geographicalNames"</a><br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; })<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; );<br>
<br>
The post request generated with the second layer is: <br>
<code role="listitem" class="focusRow subFocusRow ">&lt;wfs:GetFeature
xmlns:wfs=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/wfs">"http://www.opengis.net/wfs"</a>
service="WFS" version="1.1.0"
xsi:schemaLocation</code><code role="listitem" class="focusRow subFocusRow ">=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/wfshttp://schemas.opengis.net/wfs/1.1.0/wfs.xsd">"http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"</a>
xmlns:xsi="<a class="moz-txt-link-freetext" href="http://www.w3.org/">http://www.w3.org</a></code><code role="listitem" class="focusRow subFocusRow ">/2001/XMLSchema-instance"&gt;<br>
&lt;wfs:Query typeName="esdin:geographicalNames" srsName="EPSG:30800"
xmlns:esdin</code><code role="listitem" class="focusRow subFocusRow ">=<a class="moz-txt-link-rfc2396E" href="http://www.metainfo.se/esdin">"http://www.metainfo.se/esdin"</a>&gt;<br>
&lt;ogc:Filter xmlns:ogc=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/ogc">"http://www.opengis.net/ogc"</a>&gt;<br>
&lt;ogc:BBOX&gt;<br>
&lt;ogc:PropertyName</code><code role="listitem" class="focusRow subFocusRow ">&gt;SHAPE&lt;/ogc:PropertyName&gt;<br>
&lt;gml:Envelope xmlns:gml=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a>
srsName="EPSG:30800"&gt;<br>
&lt;gml</code><code role="listitem" class="focusRow subFocusRow ">:lowerCorner&gt;-45.25
16.72265625&lt;/gml:lowerCorner&gt;<br>
&lt;gml:upperCorner&gt;67.25 85.27734375&lt;/gml:upperCorner</code><code role="listitem" class="focusRow subFocusRow ">&gt;<br>
&lt;/gml:Envelope&gt;<br>
&lt;/ogc:BBOX&gt;<br>
&lt;/ogc:Filter&gt;<br>
&lt;/wfs:Query&gt;<br>
&lt;/wfs:GetFeature&gt;</code><br>
<br>
</div>

_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>http://openlayers.org/mailman/listinfo/dev<br></blockquote></div><br></div></body></html>