[TinyOWS-users] Does TinyOWS do reprojection?

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


Olivier,

  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)
)
WITH (
   OIDS=FALSE
);
ALTER TABLE censuscities OWNER TO tinyows;

===========================================================

My TinyOWS config.xml:

<tinyows online_resource="http://thinkcentre1/cgi-bin/tinyows.exe"
   schema_dir="/ms4w/apps/tinyows/schema/"
   log="/ms4w/tmp/tinyows.log"
   log_level="15">
<pg host="127.0.0.1" user="tinyows" password="tinyows" 
dbname="tinyows_demo" port="5432"/>
<metadata name="TinyOWS Server" title="TinyOWS Server - Demo Service" />

<layer retrievable="1"
     writable="1"
     ns_prefix="tinyows_demo"
     ns_uri="http://thinkcentre1/cgi-bin/tinyows.exe"
     name="censuscities"
     srid="4269"
     title="Census Cities" />
</tinyows>

===========================================================
A portion of the post sent by TinyOWS:

<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" 
srsName="EPSG:3857">

===========================================================
And the error:

<?xml version='1.0' encoding='UTF-8'?>
<ExceptionReport
  xmlns='http://www.opengis.net/ows'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
  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"
</ExceptionText>
</Exception>
</ExceptionReport>

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