Re: OpenLayers.Format.GML.write with EPSG:2154
hi
I used your method, and the result is not the same.
Initial polygon is : POLYGON((432572.220787942 6895705.136637988,433765.0966490602 6869252.816629886,465149.8306762447 6870052.155533891,463599.2580596882 6895802.363928256,432572.220787942 6895705.136637988))
GetFeature with méthod GET is ok
http://ws.carmen.developpement-durable.gouv.fr/WFS/8/nature?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=ZNIEFF_de_type_1&FILTER=%3CFilter%3E%3CIntersect%3E%3CPropertyName%3EGeometry%3C/PropertyName%3E%3Cgml:Polygon%3E%3Cgml:outerBoundaryIs%3E%3Cgml:LinearRing%3E%3Cgml:coordinates%3E432572.220787942,6895705.136637988%20433765.0966490602,6869252.816629886%20465149.8306762447,6870052.155533891%20463599.2580596882,6895802.363928256%20432572.220787942,6895705.136637988%3C/gml:coordinates%3E%3C/gml:LinearRing%3E%3C/gml:outerBoundaryIs%3E%3C/gml:Polygon%3E%3C/Intersect%3E%3C/Filter%3E
GetFeature with method post => fichier test_curl.php
is missing. Where is the problem?
Thans for you help
Richard LEHAUT Tiolebucheron
On Sat, Oct 30, 2010 at 10:47 AM, Richard LEHAUT
> I can try.I don't get the same results as you.
>
> The coordonnee initials sont en 25572 :
> POLYGON((439405.54831656 2501480.5328861,511724.95370852
> 2478197.2121257,515605.50716858 2489133.3173313,441874.9914275
> 2510652.7501553,439405.54831656 2501480.5328861))
>
> When, i transform projection in 2154 with function geometry.transform(), i
> get :
> POLYGON((579935.0307896 11379308.343843013,652279.391024183
> 11354700.957354637,656364.0020029543 11365633.978103733,582568.3536138271
> 11388492.710118398,579935.0307896 11379308.343843013,579935.0307896
> 11379308.343843013)) . It's correct. When i used the fonction fomats.write
> () 491432.98817530926,6936119.019221687,44.53511819243431
> 563513.9567961813,6912250.991385791,43.90459069609642
> 567483.0224642601,6923147.889697679,43.85644343402237
> 493976.663637052,6945265.1890874775,44.50042778160423
> 491432.98817530926,6936119.019221687,44.53511819243431.
>
> The coordinates of each point individually are false. Why?
>>> proj27572 = new OpenLayers.Projection("EPSG:27572");
>>> proj2154 = new OpenLayers.Projection("EPSG:2154");
>>> polygon27572 = OpenLayers.Geometry.fromWKT("POLYGON((439405.54831656 2501480.5328861,511724.95370852 2478197.2121257,515605.50716858 2489133.3173313,441874.9914275 2510652.7501553,439405.54831656 2501480.5328861))");
>>> polygon2154 = polygon27572.clone();
>>> polygon2154.transform(proj27572, proj2154);
>>> polygon2154.toString()
"POLYGON((491432.9881753047 6936119.019221775,563513.9567961755
6912250.991385875,567483.0224642548
6923147.889697764,493976.66363704775
6945265.189087565,491432.9881753047 6936119.019221775))"
>>> format = new OpenLayers.Format.GML.v2({internalProjection: proj27572, externalProjection: proj2154});
>>> format.write(new OpenLayers.Feature.Vector(polygon27572));"<gml:featureMember xmlns:gml="http://www.opengis.net/gml"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><gml:null><gml:geometry><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates
xsi:schemaLocation="http://www.opengis.net/gml
http://schemas.opengis.net/gml/2.1.2/feature.xsd"
decimal="." cs="," ts="
">491432.9881753047,6936119.019221775,44.53511819243431
563513.9567961755,6912250.991385875,43.90459069143981
567483.0224642548,6923147.889697764,43.85644343588501
493976.66363704775,6945265.189087565,44.50042778160423
491432.9881753047,6936119.019221775,44.53511819243431</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:geometry></gml:null></gml:featureMember>"
So the results make sense in my case.
--Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine <at> camptocamp.com
http://www.camptocamp.com
_______________________________________________
Users mailing list
Users-qjLDD68F18NyQMAyxoHuMA@public.gmane.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________ Users mailing list Users@... http://lists.osgeo.org/mailman/listinfo/openlayers-users
RSS Feed