Data Plotted at Wrong Location

Brent Fraser bfraser at GEOANALYTIC.COM
Mon Dec 10 14:25:36 EST 2007


Toan,

  Looking at the snippet of the csv file you provided below,
you've got some coordinates in a Geographic (decimal degrees
of latitude and longitude) and some in a projected system
(meters LCC?).  Mapserver usually allows only one coordinate
system definition per input file, so this is not valid.
They need to be all Geographic coordinates or all projected.

  And check your extents in the map file.  Would they cover
the points in the csv file?  It might be helpful if you
included your map file.

Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta

----- Original Message ----- 
From: "Tran, Toan (MCYS)" <Toan.Tran at ONTARIO.CA>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, December 10, 2007 11:51 AM
Subject: Re: [UMN_MAPSERVER-USERS] Data Plotted at Wrong
Location


Brent,

Thank you for your help. I am new to Map Server...

I have:
PROJECTION
   "init=epsg:42304"
END

inside both my top-level MAP and LAYER definition.

I try Adding/Changing (Is this what your meant?) inside my
Layer
definition... All the points that as plotted before are now
gone.
PROJECTION
 "init=epsg:4269"
END

The proper location is still not plotted.
Something I am doing incorrectly?

Thank you so much for your help.
Toan


-----Original Message-----
From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: December 10, 2007 1:33 PM
To: Tran, Toan (MCYS); MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Data Plotted at Wrong
Location


Toan,

  You haven't specified the coordinate system of the input
data so MapServer assumes it's the same as the coordinate
system for the
output map (LCC).

  Add a PROJECTION object to the csv file's LAYER
definition.  For example, if the input data in the csv file
is NAD83:

LAYER csv
PROJECTION
 "init=epsg:4269"
END
:


Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta
----- Original Message ----- 
From: "Tran, Toan (MCYS)" <Toan.Tran at ONTARIO.CA>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, December 10, 2007 11:13 AM
Subject: [UMN_MAPSERVER-USERS] Data Plotted at Wrong
Location


Hi,
I wish to plot several points in Ontario, Canada, but the
problem is
that the points are plotted at the wrong location. My data
are in
decimal degree stored in a CSV file. But when the map was
draw, all the
points are plotted very closed together. I suspect that for
some reason,
the map-server is plotting the data as meter/or any other
unit instead
of degree decimal. I used this PROJECTION in both my
top-level MAP and
proper layer, with UNITS METERS: PROJECTION
"init=epsg:42304" END I
added this for the /usr/local/share/proj/epsg file because
it wasn't
there after I installed the Projection Library: <42304>
+proj=lcc
+lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95
+x_0=0 +y_0=0
+ellps=GRS80 +datum=NAD83 +units=m +no_defs no_defs <>
Is it enough to simple add the above epsg code???
Changing UNITS METERS to UNITS DD in my map file doesn't
help either.
Here are some sample DATA:
 <<img.GIF>>
Desc,,X,Y
"5",79.725833,43.715361
"6",81.000107,43.368512
"7",-78.347276,44.301459
"8",,81.332038,48.47381
"9",79.68955,43.4662
...
"AAAAAAAAAAAAAAAAAAAAAAaaaaaa19",0,200000
"AAAAAAAAAAAAAAAAAAAAAAaaaaaa20",0,220000
"AAAAAAAAAAAAAAAAAAAAAAaaaaaa21",0,240000
"AAAAAAAAAAAAAAAAAAAAAAaaaaaa30",0,300000
"AAAAAAAAAAAAAAAAAAAAAAaaaaaa31",10000,300000

This is what I see when I type ./mapserv -v
MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=OGR
INPUT=GDAL
INPUT=SHAPEFILE DEBUG=MSDEBUG Any help is much appreciated
Thanks Toan



More information about the mapserver-users mailing list