[OpenLayers-Users] wfs, state plane, and spherical mercator

Christopher Schmidt crschmidt at metacarta.com
Mon Apr 6 17:05:49 EDT 2009


On Mon, Apr 06, 2009 at 02:56:42PM -0600, David Hollema wrote:
> Next question.  I want to recenter the map based on a feature created
> from a separate WFS request.   I use OL.Format.GML and the read method
> to create a new feature from the responseXML.  When I look at the
> geometry of the point feature, the x,y cords are in the native
> coordinates.  I tried point.transform("EPSG:2231","EPSG:900913") but the
> transformation never works properly.  All the examples I see go from
> 4326 to 900913.  My data are in State Plane.  I would expect that the
> underlying transformation library could handle this transformation but
> maybe not?

1. The GML layer supports reprojection as a layer option, just specify
the projection:

  Layer.GML("", "", {projection: new
  OpenLayers.Projection("EPSG:2231")});

2. In order to use anything other than 900913 and 4326, yu'll need
to include proj4js support (seperately from OpenLayers).
http://proj4js.org / http://trac.osgeo.org/proj4js/ may help you here.

-- Chris

>  
> 
> Thanks,
> 
>  
> 
> Dave
> 
>  
> 
> David A. Hollema
> 
> GIS Analyst
> 
>  
> 
> United Power, Inc.
> 

> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users


-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list