Data Plotted at Wrong Location

Tran, Toan (MCYS) Toan.Tran at ONTARIO.CA
Mon Dec 10 11:57:28 PST 2007


Hi Brent,

I have include the config.map and the .csv file 

I have thought if EXTENT could be an issue, but modifying the minX,
minY, maxX, maxY doesn't seem to have any effect. 
Those large number in the .csv file are added because I wanted to test
the plotted points...

One thing that I find very puzzling is that we have tried the map-server
using two different platform:
	- Windows XP
      - Solaris SPARC / UNIX

Both platform use almost the exact config.map file and .csv file
But for some reason, we did not have any problem on the Window
Platform... All the points are plotted with little trouble... but then
again, in Windows the map-server was package very nicely in a binary
form.

Also, I pay very close attention so case-sensitive issues (i.e. epsg
V.S. EPSG). Could the problem be some other case sensitivity issue in
Soalris/UNIX?


Thank you so much for your help so far.

Much appreciated
Toan

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


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.map
Type: application/octet-stream
Size: 2901 bytes
Desc: config.map
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071210/b8f72b1d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geo_code_phu.csv
Type: application/octet-stream
Size: 245 bytes
Desc: geo_code_phu.csv
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071210/b8f72b1d/attachment-0001.obj>


More information about the MapServer-users mailing list