[TinyOWS-users] Does TinyOWS do reprojection?

Brent Fraser bfraser at geoanalytic.com
Mon Feb 13 19:10:06 EST 2012


  I'm alpha testing the new Feature Editor within GeoMoose v2.6.  It is 
a JavaScript application using OpenLayers 2.11, MS4W 3, and PostGIS 1.5 
at the backend.

   Loading the shapefile with shp2pgsql seemed to work better than 
trying to add to an empty table with Feature Editor.  I was able to 
display the geometry (and attributes) but saving the geometry edits 
didn't work, due to a SRS mismatch.   Note that I wane to edit in 
EPSG:3857 and store the data in EPSG:4269.

My table:

CREATE TABLE censuscities
   gid serial NOT NULL,
   statefp10 character varying(2),
   placefp10 character varying(5),
   placens10 character varying(8),
   geoid10 character varying(7),
   name10 character varying(100),
   namelsad10 character varying(100),
   lsad10 character varying(2),
   classfp10 character varying(2),
   pcicbsa10 character varying(1),
   pcinecta10 character varying(1),
   mtfcc10 character varying(5),
   funcstat10 character varying(1),
   aland10 double precision,
   awater10 double precision,
   intptlat10 character varying(11),
   intptlon10 character varying(12),
   the_geom geometry,
   CONSTRAINT censuscities_pkey PRIMARY KEY (gid),
   CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2),
   CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 
'MULTIPOLYGON'::text OR the_geom IS NULL),
   CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269)
ALTER TABLE censuscities OWNER TO tinyows;


My TinyOWS config.xml:

<tinyows online_resource="http://thinkcentre1/cgi-bin/tinyows.exe"
<pg host="" user="tinyows" password="tinyows" 
dbname="tinyows_demo" port="5432"/>
<metadata name="TinyOWS Server" title="TinyOWS Server - Demo Service" />

<layer retrievable="1"
     title="Census Cities" />

A portion of the post sent by TinyOWS:

<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" 

And the error:

<?xml version='1.0' encoding='UTF-8'?>
  version='1.0.0' language='en'>
<Exception exceptionCode='InvalidParameterValue' locator='Update'>
<ExceptionText>ERROR:  new row for relation "censuscities" violates 
check constraint "enforce_srid_the_geom"

Best Regards,
Brent Fraser

On 2/13/2012 4:07 PM, Olivier Courtin wrote:
> On Sat, Feb 11, 2012 at 4:24 PM, Brent Fraser <bfraser at geoanalytic.com 
> <mailto:bfraser at geoanalytic.com>> wrote:
>     I'd like to store my data in PostGIS in EPSG:4269 (geographic) but
>     edit
>     in EPSG:3857 (Web/Spherical Mercator ) using OpenLayers.  Will TinyOSW
>     do the re-projection or instruct PostGIS to do a ST_Transform?
> WFS standard support reprojection since 1.1.0 version
> So do TinyOWS
> So be carefull in your OpenLayers client to clearly specify
> the right WFS version (As 1.0.0 don't support reprojection)
> HTH,
> -- 
> Olivier
> _______________________________________________
> TinyOWS-users mailing list
> TinyOWS-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tinyows-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-users/attachments/20120213/d4e6d563/attachment.htm 

More information about the TinyOWS-users mailing list