TR : RE : RE : [Mapserver-users] Projection conversion

nicolas.fortin at ec.gc.ca nicolas.fortin at ec.gc.ca
Mon Nov 3 05:53:54 PST 2003


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3A211.EB4A88A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
=20
After speaking to the geo staff here, I found why it doesn't works.  =
The LCC
we use is an "home-made" LCC so I had to add a line to the epsg file.
=20
Here is my new line :
# Canada Lambert Conformal Conic EC-CMI
<111111> +proj=3Dlcc +lat_1=3D49 +lat_2=3D77 +lat_0=3D63 =
+lon_0=3D-91.8666
+x_0=3D6200000 +y_0=3D2958000 +ellps=3DGRS80 +datum=3DNAD83 +units=3Dm  =
no_defs <>

Of course, now I use=20
=20
PROJECTION=20
  "epsg:111111"
END
=20
Now the reprojection is perfect!
Thx a lot for your help!
=20
Nick
=20
-----Message d'origine-----
De : Tyler Mitchell [mailto:TMitchell at lignum.com]=20
Envoy=E9 : Friday, October 31, 2003 1:52 PM
=C0 : nicolas.fortin at ec.gc.ca
Objet : Re: RE : RE : [Mapserver-users] Projection conversion


Hey Nick,=20
Good stuff, I think you're on the right track. =20
I think that maybe the easiest thing to do would be to change your SDO
query:
>   DATA "GEOLOC FROM USR_BATHY.SHORELINE USING SRID 82196"
So that the SRID matches the EPSG:102002.  Then you wouldn't, in =
theory,
have to set your project for the layers at all.
=20
Let us know how you get on.
=20
Tyler

-----mapserver-users-admin at lists.gis.umn.edu wrote: -----

To: TMitchell at lignum.com, nicolas.fortin at ec.gc.ca
From: nicolas.fortin at ec.gc.ca
Sent by: mapserver-users-admin at lists.gis.umn.edu
Date: 10/31/2003 10:15AM
cc: mapserver-users at lists.gis.umn.edu
Subject: RE : RE : [Mapserver-users] Projection conversion

Thanks for your answer!

The EXTENT in comment is an extent on the shoreline layer and if I =
switch to
it, I'll see the shoreline correctly.

If I remove all the PROJECTION, all work fine too but only one layer at =
a
time depending of the bounding box uses.

I'll see if epsg:2145 and epsg:102002 are 'really' the same as the SDO
projection...

Nick

-----Message d'origine-----
De : Tyler Mitchell [mailto:TMitchell at lignum.com
<mailto:TMitchell at lignum.com> ]=20
Envoy=E9 : Friday, October 31, 2003 11:46 AM
=C0 : nicolas.fortin at ec.gc.ca
Cc : mapserver-users at lists.gis.umn.edu
Objet : RE : [Mapserver-users] Projection conversion







I haven't used Oracle Spatiall, but if you are wondering about =
projections,
here is an idea to try. It looks too me like you have everything setup
properly in your map file - the only problem may be your data. Your map =
file
project setting and your "PointTest" layer's projection settings are =
the
same, therefore, no reprojecting is required for that layer.  Your
"shoreline" layer has a different EPSG, so it has to project it.

I'd guess that there could be at least 3 things going on:
- Your request for the data using SRID=3D82196 may not be giving you =
data that
is in EPSG:2145
- EPSG:2145 may be wrong altogether
- There is no data being returned from Oracle.

I suggest changig the EXTENT and map file PROJECTION settings to match =
your
Shoreline data.  If you can view the shoreline data, then you can at =
least
rule out my last point above.

Tyler

> I'm new to mapserver and I'm making some tests to make it work with=20
> Oracle spatial (very simple tests though).
>
> One of my test consist of two layers, one in Lambert Conformal Conic
> (LCC) and the other in NAD83 MTM Zone 8.
>
> I wonder if I have to do something special to make Mapserver convert=20
> between projection...
>
> For the mapfile below, only the LCC layer is visible in the bounding=20
> box.
>
> # BEGIN MAPFILE
> # Mapserver test 3 for Oracle
> # Nicolas Fortin, Env Can nicolas.fortin at ec.gc.ca
>
> NAME MS_ORA_TEST_3
> EXTENT 7613000 1218000 7620000 1227000
> #EXTENT 275000 5019000 280000 5027000
> SIZE 350 450
> PROJECTION
>   "init=3Depsg:102002"
> END
>
> LAYER # Test table
>   NAME "PointTest"
>   TYPE POINT
>   CONNECTIONTYPE oraclespatial
>   CONNECTION "martins/****@bayfield"
>   DATA "GEOLOC FROM MARTINS.CT_LCC_MI"
>   STATUS DEFAULT
>   DUMP TRUE
>
>   PROJECTION
>     "init=3Depsg:102002"
>   END
>
>   CLASS # PolyClass
>     NAME "Point"
>     COLOR 0 100 240
>     OUTLINECOLOR 0 0 0
>   END
>
> END # LAYER
>
> LAYER # Test table
>   NAME Shoreline
>   TYPE LINE
>   CONNECTIONTYPE oraclespatial
>   CONNECTION "usr_bathy/****@bayfield"
>   DATA "GEOLOC FROM USR_BATHY.SHORELINE USING SRID 82196"
>   STATUS DEFAULT
>   DUMP TRUE
>
>   PROJECTION
>     "init=3Depsg:2145"
>   END
>
>   CLASS # PolyClass
>     NAME "Shoreline"
>     COLOR 0 0 0
>     #LABEL
>     #  COLOR 0 0 0
>     #END # LABEL
>   END
>
> END # LAYER
>
> END
> # END MAPFILE
> Thx,
> Nicolas Fortin
> Math=E9maticien, Programmeur, Analyste de donn=E9es
> SMC-Qu=E9bec Hydrologie, Environnement Canada
> 1141, Rte de l'=C9glise, Sainte-Foy(QC) G1V 4H5
> (418)648-2516
> nicolas.fortin at ec.gc.ca <mailto:nicolas.fortin at ec.gc.ca
<mailto:nicolas.fortin at ec.gc.ca> >
>

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
<http://lists.gis.umn.edu/mailman/listinfo/mapserver-users>=20


------_=_NextPart_001_01C3A211.EB4A88A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003>After=20
speaking to the geo staff here, I found why it doesn't works.  The =
LCC we=20
use is an "home-made" LCC so I had to add a line to the epsg=20
file.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003>Here=20
is my new line :</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003>#=20
Canada Lambert Conformal Conic EC-CMI<BR><111111> +proj=3Dlcc =
+lat_1=3D49=20
+lat_2=3D77 +lat_0=3D63 +lon_0=3D-91.8666 +x_0=3D6200000 +y_0=3D2958000 =
+ellps=3DGRS80=20
+datum=3DNAD83 +units=3Dm  no_defs =
<><BR></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003>Of=20
course, now I use </SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003>PROJECTION </SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003> =20
"epsg:111111"</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003>END</SPAN></FONT><FONT face=3DArial =
color=3D#0000ff=20
size=3D2><SPAN class=3D761575318-31102003></DIV></SPAN></FONT>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003> </DIV></SPAN></FONT>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003>Now=20
the reprojection is perfect!</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D761575318-31102003>Thx a=20
lot for your help!</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003>Nick</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D761575318-31102003> </DIV></SPAN></FONT></FONT></DIV>
<DIV></DIV>
<DIV class=3DOutlookMessageHeader lang=3Dfr dir=3Dltr =
align=3Dleft><FONT face=3DTahoma=20
size=3D2>-----Message d'origine-----<BR><B>De :</B> Tyler Mitchell =

[mailto:TMitchell at lignum.com] <BR><B>Envoy=E9 :</B> Friday, =
October 31, 2003=20
1:52 PM<BR><B>=C0 :</B> =
nicolas.fortin at ec.gc.ca<BR><B>Objet :</B> Re: RE=20
: RE : [Mapserver-users] Projection =
conversion<BR><BR></FONT></DIV><FONT=20
face=3D"Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" =
size=3D2>
<DIV>Hey Nick, </DIV>
<DIV>Good stuff, I think you're on the right track.  </DIV>
<DIV>I think that maybe the easiest thing to do would be to change your =
SDO=20
query:</DIV>
<DIV><FONT face=3D"Courier New">>   DATA "GEOLOC FROM =
USR_BATHY.SHORELINE=20
USING SRID 82196"</FONT><BR>So that the SRID matches the =
EPSG:102002.  Then=20
you wouldn't, in theory, have to set your project for the layers at =
all.</DIV>
<DIV> </DIV>
<DIV>Let us know how you get on.</DIV>
<DIV> </DIV>
<DIV>Tyler<BR></DIV><FONT=20
color=3D#990099>-----mapserver-users-admin at lists.gis.umn.edu wrote:=20
-----<BR><BR></FONT>To: TMitchell at lignum.com, =
nicolas.fortin at ec.gc.ca<BR>From:=20
nicolas.fortin at ec.gc.ca<BR>Sent by:=20
mapserver-users-admin at lists.gis.umn.edu<BR>Date: 10/31/2003 10:15AM<BR>c=
c:=20
mapserver-users at lists.gis.umn.edu<BR>Subject: RE : RE : =
[Mapserver-users]=20
Projection conversion<BR><BR><FONT face=3Dmonospace size=3D2>Thanks for =
your=20
answer!<BR><BR>The EXTENT in comment is an extent on the shoreline =
layer and if=20
I switch to<BR>it, I'll see the shoreline correctly.<BR><BR>If I remove =
all the=20
PROJECTION, all work fine too but only one layer at a<BR>time depending =
of the=20
bounding box uses.<BR><BR>I'll see if epsg:2145 and epsg:102002 are =
'really' the=20
same as the SDO<BR>projection...<BR><BR>Nick<BR><BR>-----Message=20
d'origine-----<BR>De : Tyler Mitchell [<A =
href=3D"mailto:TMitchell at lignum.com"=20
target=3Dblank>mailto:TMitchell at lignum.com</A>] <BR>Envoy=E9 : Friday, =
October 31,=20
2003 11:46 AM<BR>=C0 : nicolas.fortin at ec.gc.ca<BR>Cc :=20
mapserver-users at lists.gis.umn.edu<BR>Objet : RE : [Mapserver-users] =
Projection=20
conversion<BR><BR><BR><BR><BR><BR><BR><BR>I haven't used Oracle =
Spatiall, but if=20
you are wondering about projections,<BR>here is an idea to try. It =
looks too me=20
like you have everything setup<BR>properly in your map file - the only =
problem=20
may be your data. Your map file<BR>project setting and your "PointTest" =
layer's=20
projection settings are the<BR>same, therefore, no reprojecting is =
required for=20
that layer.  Your<BR>"shoreline" layer has a different EPSG, so it =
has to=20
project it.<BR><BR>I'd guess that there could be at least 3 things =
going=20
on:<BR>- Your request for the data using SRID=3D82196 may not be giving =
you data=20
that<BR>is in EPSG:2145<BR>- EPSG:2145 may be wrong altogether<BR>- =
There is no=20
data being returned from Oracle.<BR><BR>I suggest changig the EXTENT =
and map=20
file PROJECTION settings to match your<BR>Shoreline data.  If you =
can view=20
the shoreline data, then you can at least<BR>rule out my last point=20
above.<BR><BR>Tyler<BR><BR>> I'm new to mapserver and I'm making =
some tests=20
to make it work with <BR>> Oracle spatial (very simple tests=20
though).<BR>><BR>> One of my test consist of two layers, one in =
Lambert=20
Conformal Conic<BR>> (LCC) and the other in NAD83 MTM Zone =
8.<BR>><BR>>=20
I wonder if I have to do something special to make Mapserver convert =
<BR>>=20
between projection...<BR>><BR>> For the mapfile below, only the =
LCC layer=20
is visible in the bounding <BR>> box.<BR>><BR>> # BEGIN =
MAPFILE<BR>>=20
# Mapserver test 3 for Oracle<BR>> # Nicolas Fortin, Env Can=20
nicolas.fortin at ec.gc.ca<BR>><BR>> NAME MS_ORA_TEST_3<BR>> =
EXTENT=20
7613000 1218000 7620000 1227000<BR>> #EXTENT 275000 5019000 280000=20
5027000<BR>> SIZE 350 450<BR>> PROJECTION<BR>>  =20
"init=3Depsg:102002"<BR>> END<BR>><BR>> LAYER # Test =
table<BR>>  =20
NAME "PointTest"<BR>>   TYPE POINT<BR>>   =
CONNECTIONTYPE=20
oraclespatial<BR>>   CONNECTION "martins/****@bayfield"<BR>> =
 =20
DATA "GEOLOC FROM MARTINS.CT_LCC_MI"<BR>>   STATUS =
DEFAULT<BR>>=20
  DUMP TRUE<BR>><BR>>   PROJECTION<BR>>   =
 =20
"init=3Depsg:102002"<BR>>   END<BR>><BR>>   CLASS #=20
PolyClass<BR>>     NAME "Point"<BR>>     =
COLOR 0 100=20
240<BR>>     OUTLINECOLOR 0 0 0<BR>>   =
END<BR>><BR>>=20
END # LAYER<BR>><BR>> LAYER # Test table<BR>>   NAME=20
Shoreline<BR>>   TYPE LINE<BR>>   CONNECTIONTYPE=20
oraclespatial<BR>>   CONNECTION =
"usr_bathy/****@bayfield"<BR>>  =20
DATA "GEOLOC FROM USR_BATHY.SHORELINE USING SRID 82196"<BR>>   =
STATUS=20
DEFAULT<BR>>   DUMP TRUE<BR>><BR>>   =
PROJECTION<BR>>=20
    "init=3Depsg:2145"<BR>>   END<BR>><BR>> =
  CLASS #=20
PolyClass<BR>>     NAME "Shoreline"<BR>>     =
COLOR 0 0=20
0<BR>>     #LABEL<BR>>     #  COLOR 0 0 =
0<BR>>=20
    #END # LABEL<BR>>   END<BR>><BR>> END #=20
LAYER<BR>><BR>> END<BR>> # END MAPFILE<BR>> Thx,<BR>> =
Nicolas=20
Fortin<BR>> Math=E9maticien, Programmeur, Analyste de =
donn=E9es<BR>>=20
SMC-Qu=E9bec Hydrologie, Environnement Canada<BR>> 1141, Rte de =
l'=C9glise,=20
Sainte-Foy(QC) G1V 4H5<BR>> (418)648-2516<BR>> =
nicolas.fortin at ec.gc.ca=20
<<A href=3D"mailto:nicolas.fortin at ec.gc.ca"=20
target=3Dblank>mailto:nicolas.fortin at ec.gc.ca</A>><BR>><BR><BR>___=
____________________________________________<BR>Mapserver-users=20
mailing list<BR>Mapserver-users at lists.gis.umn.edu<BR><A=20
href=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users"=20
target=3Dblank>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users=
</A><BR></FONT></FONT></BODY></HTML>

------_=_NextPart_001_01C3A211.EB4A88A0--



More information about the MapServer-users mailing list