[prev in list] [next in list] [prev in thread] [next in thread]
List: mapserver-dev
Subject: Re: [mapserver-dev] Wrong .prj file with SHAPEZIP Outputformat
From: Frank Warmerdam <warmerdam () pobox ! com>
Date: 2013-05-16 21:49:02
Message-ID: CA+YzLBeRrz-0SQWJmy3icg21CAsJPERA1zmweFuxs1o2s2YOPg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Guillaume,
Yes, I believe this is exactly the issue. Good luck!
Best regards,
Frank
On Thu, May 16, 2013 at 5:38 AM, Guillaume Sueur <no-reply@neogeo-online.net
> wrote:
> I think I undestood. mapgdal.c retrieves the mapserver projection
> definition and translates it to proj4 string, and then ask GDAL for a WKS.
> I think it should be using ESPG code when available to allow GDAL to
> retrieve more information from its CRS database than the proj4 string
> allows it to.
>
> Gonna try to hack it a bit...
>
>
> Le 16/05/13 13:29, Thomas Gratier a écrit :
>
> > Hello,
> >
> > Just a guess: the Mapserver projection file comes maybe from GEOS and
> > GDAL retrieve the wrong proj (deduce from the mapfile) after (although
> > with your analysis it doesn't seem so) >>
> > http://mapserver.org/faq.html#**where-do-i-find-my-epsg-code<http://mapserver.org/faq.html#where-do-i-find-my-epsg-code>
> >
> > Regards
> >
> > Thomas Gratier
> >
> >
> > 2013/5/16 Guillaume Sueur <no-reply@neogeo-online.net
> > <mailto:no-reply@neogeo-**online.net <no-reply@neogeo-online.net>>>
> >
> >
> > Hi list(s),
> >
> > Sorry for cross-posting gdal and mapserver dev lists, but I don't
> > know exactly where my problem comes from.
> >
> > When using a SHAPEZIP OUTPUTFORMAT with MapServer, I retrieve a prj
> > file which is not exactly the correct projection definition (for
> > EPSG:3946) :
> >
> > PROJCS["Lambert_Conformal___**Conic",GEOGCS["GCS_GRS 1980(IUGG,
> > 1980)",DATUM["D_unknown",__**SPHEROID["GRS80",6378137,298._**
> > _257222101]],PRIMEM["**Greenwich"__,0],UNIT["Degree",**
> > 0.__017453292519943295]],__**PROJECTION["Lambert_Conformal_**
> > __Conic"],PARAMETER["standard_**__parallel_1",45.25],**
> > PARAMETER["__standard_**parallel_2",46.75],__**
> > PARAMETER["latitude_of_origin"**__,46],PARAMETER["central___**
> > meridian",3],PARAMETER["false_**__easting",1700000],PARAMETER[**
> > "__false_northing",5200000],**UNIT[__"Meter",1]]
> >
> >
> > I took a look at the code in mapogroutput.c and noticed it was all
> > driven by OGR.
> >
> > So I did the same extract to a EPSG:3946 shapefile with ogr2ogr. It
> > gives the correct result :
> >
> > PROJCS["RGF93_Lambert_93",__**GEOGCS["GCS_RGF93",DATUM["D___**
> > RGF_1993",SPHEROID["GRS_1980",**__6378137,298.257222101]],__**
> > PRIMEM["Greenwich",0],UNIT["__**Degree",0.017453292519943295]]**
> > __,PROJECTION["Lambert___**Conformal_Conic"],PARAMETER["_**
> > _standard_parallel_1",49],__**PARAMETER["standard_parallel__**
> > _2",44],PARAMETER["latitude_**of___origin",46.5],PARAMETER["**
> > __central_meridian",3],__**PARAMETER["false_easting",__**
> > 700000],PARAMETER["false___**northing",6600000],UNIT["__**Meter",1]]
> >
> >
> > which makes the shapefile's projection understandable by QGIS.
> >
> > So, the question is : where does the prj definition generated by
> > mapserver come from ? Why is it wrong and how to fix this ?
> >
> > Best regards
> >
> > Guillaume
> > ______________________________**___________________
> > mapserver-dev mailing list
> > mapserver-dev@lists.osgeo.org \
> > <mailto:mapserver-dev@lists.**osgeo.org<mapserver-dev@lists.osgeo.org>
> > >
> > http://lists.osgeo.org/__**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/__mailman/listinfo/mapserver-dev>
> > <http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
> >
> > **>
> >
> >
> > ______________________________**_________________
> mapserver-dev mailing list
> mapserver-dev@lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Software Developer
[Attachment #5 (text/html)]
<div dir="ltr"><br><div class="gmail_extra">Guillaume, </div><div \
class="gmail_extra"><br></div><div class="gmail_extra">Yes, I believe this is exactly \
the issue. Good luck!</div><div class="gmail_extra"><br></div><div \
class="gmail_extra"> Best regards,</div><div class="gmail_extra">Frank<br><br><div \
class="gmail_quote">On Thu, May 16, 2013 at 5:38 AM, Guillaume Sueur <span \
dir="ltr"><<a href="mailto:no-reply@neogeo-online.net" \
target="_blank">no-reply@neogeo-online.net</a>></span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">I think I undestood. mapgdal.c retrieves the mapserver \
projection definition and translates it to proj4 string, and then ask GDAL for a WKS. \
I think it should be using ESPG code when available to allow GDAL to retrieve more \
information from its CRS database than the proj4 string allows it to.<br>
<br>
Gonna try to hack it a bit...<br>
<br>
<br>
Le 16/05/13 13:29, Thomas Gratier a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im"> Hello,<br>
<br>
Just a guess: the Mapserver projection file comes maybe from GEOS and<br>
GDAL retrieve the wrong proj (deduce from the mapfile) after (although<br>
with your analysis it doesn't seem so) >><br>
<a href="http://mapserver.org/faq.html#where-do-i-find-my-epsg-code" \
target="_blank">http://mapserver.org/faq.html#<u></u>where-do-i-find-my-epsg-code</a><br>
<br>
Regards<br>
<br>
Thomas Gratier<br>
<br>
<br>
2013/5/16 Guillaume Sueur <<a href="mailto:no-reply@neogeo-online.net" \
target="_blank">no-reply@neogeo-online.net</a><br></div> <mailto:<a \
href="mailto:no-reply@neogeo-online.net" \
target="_blank">no-reply@neogeo-<u></u>online.net</a>>><div class="im"><br> \
<br> Hi list(s),<br>
<br>
Sorry for cross-posting gdal and mapserver dev lists, but I don't<br>
know exactly where my problem comes from.<br>
<br>
When using a SHAPEZIP OUTPUTFORMAT with MapServer, I retrieve a prj<br>
file which is not exactly the correct projection definition (for<br>
EPSG:3946) :<br>
<br></div>
PROJCS["Lambert_Conformal___<u></u>Conic",GEOGCS["GCS_GRS \
1980(IUGG,<br> 1980)",DATUM["D_unknown",__<u></u>SPHEROID["GRS80& \
quot;,6378137,298._<u></u>_257222101]],PRIMEM["<u></u>Greenwich"__,0],UNIT[& \
quot;Degree",<u></u>0.__017453292519943295]],__<u></u>PROJECTION["Lambert_Co \
nformal_<u></u>__Conic"],PARAMETER["standard_<u></u>__parallel_1",45.25 \
],<u></u>PARAMETER["__standard_<u></u>parallel_2",46.75],__<u></u>PARAMETER[ \
"latitude_of_origin"<u></u>__,46],PARAMETER["central___<u></u>meridian& \
quot;,3],PARAMETER["false_<u></u>__easting",1700000],PARAMETER[<u></u>"__false_northing",5200000],<u></u>UNIT[__"Meter",1]]<div \
class="im"> <br>
<br>
I took a look at the code in mapogroutput.c and noticed it was all<br>
driven by OGR.<br>
<br>
So I did the same extract to a EPSG:3946 shapefile with ogr2ogr. It<br>
gives the correct result :<br>
<br></div>
PROJCS["RGF93_Lambert_93",__<u></u>GEOGCS["GCS_RGF93",DATUM[&q \
uot;D___<u></u>RGF_1993",SPHEROID["GRS_1980",<u></u>__6378137,298.25722 \
2101]],__<u></u>PRIMEM["Greenwich",0],UNIT["__<u></u>Degree",0.017 \
453292519943295]]<u></u>__,PROJECTION["Lambert___<u></u>Conformal_Conic"],PA \
RAMETER["_<u></u>_standard_parallel_1",49],__<u></u>PARAMETER["standard \
_parallel__<u></u>_2",44],PARAMETER["latitude_<u></u>of___origin",46.5] \
,PARAMETER["<u></u>__central_meridian",3],__<u></u>PARAMETER["false_eas \
ting",__<u></u>700000],PARAMETER["false___<u></u>northing",6600000],UNIT["__<u></u>Meter",1]]<div \
class="im"> <br>
<br>
which makes the shapefile's projection understandable by QGIS.<br>
<br>
So, the question is : where does the prj definition generated by<br>
mapserver come from ? Why is it wrong and how to fix this ?<br>
<br>
Best regards<br>
<br>
Guillaume<br></div>
______________________________<u></u>___________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" \
target="_blank">mapserver-dev@lists.osgeo.org</a> <mailto:<a \
href="mailto:mapserver-dev@lists.osgeo.org" \
target="_blank">mapserver-dev@lists.<u></u>osgeo.org</a>><br>
<a href="http://lists.osgeo.org/__mailman/listinfo/mapserver-dev" \
target="_blank">http://lists.osgeo.org/__<u></u>mailman/listinfo/mapserver-dev</a><br>
<<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" \
target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><u></u>><br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" \
target="_blank">mapserver-dev@lists.osgeo.org</a><br> <a \
href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" \
target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- \
<br>---------------------------------------+--------------------------------------<br>I \
set the clouds in motion - turn up | Frank Warmerdam, <a \
href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br> light \
and sound - activate the windows | <a href="http://pobox.com/~warmerdam" \
target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - \
Rush | Geospatial Software Developer<br> </div></div>
_______________________________________________
mapserver-dev mailing list
mapserver-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic