<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I tried #1 below and it works sometimes.&nbsp; The key was setting
the srsName.&nbsp; That was the whole trick. &nbsp;Are those options like &#8216;typeName&#8217;, &#8216;srsName&#8217;,
etc. case sensitive?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Trouble is, my WFS layer only shows at small scales but not when
zoomed in&#8230;what other things can I check.&nbsp; Is that a server side issue?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>David A. Hollema<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>GIS Analyst<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>United Power, Inc.</span><span style='color:#1F497D'><o:p></o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jimmy Aumard
[mailto:jimmy.aumard@gmail.com] <br>
<b>Sent:</b> Thursday, April 09, 2009 1:06 AM<br>
<b>To:</b> David Hollema<br>
<b>Cc:</b> Andrea Aime; users@openlayers.org;
geoserver-users@lists.sourceforge.net<br>
<b>Subject:</b> Re: [Geoserver-users] [OpenLayers-Users] wfs, state plane, and
spherical mercator<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Hi david!<br>
<br>
for wfs I make this:<br>
<br>
var France = new OpenLayers.Layer.WFS(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &quot;France WFS&quot;,&quot;<a
href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>&quot;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; typeName: 'dep',<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; featureNS: '<a href="http://www.openplans.org/topp">http://www.openplans.org/topp</a>',
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; //style:fStyle,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; extractAttributes: true&nbsp;&nbsp;&nbsp; ,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; srsName: &quot;EPSG:900913&quot;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; },<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
{'reproject': true}<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>
<br>
or<br>
<br>
var wfs = new OpenLayers.Layer.Vector(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;France2 wfs&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projection:
new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol:
new OpenLayers.Protocol.WFS({<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
srsName: &quot;EPSG:900913&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
url: &quot;<a href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
featureType: &quot;dep&quot;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
version:'1.1.0',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
featureNS: &quot;<a href="http://www.openplans.org/topp">http://www.openplans.org/topp</a>&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; );<br>
<br>
try and tell me if it's works.<br>
<br>
Jim<o:p></o:p></p>

<div>

<p class=MsoNormal>2009/4/8 David Hollema &lt;<a
href="mailto:dhollema@unitedpower.com">dhollema@unitedpower.com</a>&gt;<o:p></o:p></p>

<p class=MsoNormal>Here is my code. &nbsp;WMS reprojects fine b/c my
understanding is geoserver<br>
receives the base map projection (900913) and reprojects accordingly. &nbsp;I<br>
would figure that geoserver would do the same thing to the WFS but it<br>
doesn't. &nbsp;My SRS handling in geoserver is set to force declared (default<br>
setting) and my declared is correct, 2231 in this case. &nbsp;For WMS, it's<br>
not even necessary to set the srs in the layer constructor b/c geoserver<br>
just figures it out.<br>
<br>
It's important to note that I even tried with my source data in 4326<br>
(lat/long) and WMS still worked fine but WFS fails. &nbsp;It doesn't seem to<br>
be due to State Plane issues but it's more fundamental than that.<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var bounds = new OpenLayers.Bounds<br>
(-20037508.34, -20037508.34, 20037508.34, 20037508.34);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var options2 = {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;units:
'm',<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projection:
'EPSG:900913',<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;maxExtent: bounds<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;};<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;format = 'image/gif';<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map2 = new OpenLayers.Map('map2',<br>
options2);<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;velayer = new<br>
OpenLayers.Layer.VirtualEarth( &quot;VE&quot;,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ 'type': VEMapStyle.Roads,<br>
'sphericalMercator': true});<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;layerWMS = new OpenLayers.Layer.WMS(<br>
&quot;Joint Use Photos&quot;,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;<a
href="http://upigis:8080/geoserver/wms" target="_blank">http://upigis:8080/geoserver/wms</a>&quot;,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {layers:
'sde:jointusepicture',<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;format: format,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;transparent: true<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;},<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;{opacity: 1.0,<br>
isBaseLayer: false, 'singleTile': true<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;});<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;layerWFS = new OpenLayers.Layer.WFS(<br>
&quot;Joint Use Photos WFS&quot;,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;<a
href="http://upigis:8080/geoserver/wfs" target="_blank">http://upigis:8080/geoserver/wfs</a>&quot;,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;typename:<br>
&quot;sde:jointusepicture&quot;},<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;{extractAttributes: true}<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);<o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
David A. Hollema<br>
GIS Analyst<br>
<br>
United Power, Inc.<o:p></o:p></p>

</div>

<div>

<div>

<p class=MsoNormal>-----Original Message-----<br>
From: <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>
[mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>]<br>
On Behalf Of Andrea Aime<br>
Sent: Tuesday, April 07, 2009 1:36 AM<br>
To: David Hollema<br>
Cc: <a href="mailto:users@openlayers.org">users@openlayers.org</a>; <a
href="mailto:geoserver-users@lists.sourceforge.net">geoserver-users@lists.sourceforge.net</a><br>
Subject: Re: [OpenLayers-Users] [Geoserver-users] wfs, state plane,and<br>
spherical mercator<br>
<br>
David Hollema ha scritto:<br>
&gt; Here's my dilemma. &nbsp;I have a map with projection defined as spherical<br>
&gt; Mercator, EPSG 900913. &nbsp;I have a geoserver WMS layer whose native<br>
&gt; projection is state plane Colorado north (EPSG 2231). &nbsp;With help from<br>
&gt; the lists, I'm able to overlay the WMS fine on a Virtual Earth map.<br>
&gt; When I add a new WFS layer (pointing at the same geoserver data) using<br>
<br>
&gt; similar constructor as the WMS, the WFS layer does not overlay fine,<br>
&gt; it's shifted way off. &nbsp;That's problem 1. &nbsp;I can't figure out how
to<br>
get<br>
&gt; the WFS to overlay.<br>
<br>
Please share the request you're making. The WFS and WMS reprojection<br>
syntaxes are not equal. Also, what is the SRS handling you chose<br>
in your feature type configuration?<br>
<br>
&gt; Next question. &nbsp;I want to recenter the map based on a feature created<br>
&gt; from a separate WFS request. &nbsp; I use OL.Format.GML and the read
method<br>
<br>
&gt; to create a new feature from the responseXML. &nbsp;When I look at the<br>
&gt; geometry of the point feature, the x,y cords are in the native<br>
&gt; coordinates. &nbsp;I tried
point.transform(&quot;EPSG:2231&quot;,&quot;EPSG:900913&quot;) but<br>
the<br>
&gt; transformation never works properly. &nbsp;All the examples I see go from<br>
&gt; 4326 to 900913. &nbsp;My data are in State Plane. &nbsp;I would expect
that the<br>
&gt; underlying transformation library could handle this transformation but<br>
<br>
&gt; maybe not?<br>
<br>
You can also have GeoServer do the reprojection for you. You just<br>
have to add &amp;srsName=EPSG:900913 to your request, keeping the eventual<br>
bbox in 2231, or have the bbox in 900913 too, but state it explicitly<br>
with &amp;bbox=x0,y0,x1,y1,EPSG:900913<br>
<br>
Cheers<br>
Andrea<br>
<br>
--<br>
Andrea Aime<br>
OpenGeo - <a href="http://opengeo.org" target="_blank">http://opengeo.org</a><br>
Expert service straight from the developers.<o:p></o:p></p>

</div>

</div>

<p class=MsoNormal>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><o:p></o:p></p>

<div>

<div>

<p class=MsoNormal><br>
------------------------------------------------------------------------------<br>
This SF.net email is sponsored by:<br>
High Quality Requirements in a Collaborative Environment.<br>
Download a free trial of Rational Requirements Composer Now!<br>
<a href="http://p.sf.net/sfu/www-ibm-com" target="_blank">http://p.sf.net/sfu/www-ibm-com</a><br>
_______________________________________________<br>
Geoserver-users mailing list<br>
<a href="mailto:Geoserver-users@lists.sourceforge.net">Geoserver-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/geoserver-users"
target="_blank">https://lists.sourceforge.net/lists/listinfo/geoserver-users</a><o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>