precalculating data projections
Mark Mansour
markmansour at YAHOO.COM
Sat Jul 31 09:33:41 PDT 2004
I'm not sure if this list is up and running, but I couldn't subscribe to the
other list.. So here goes...
I'm new to all things GIS and I need some help.
I've got data from two difference sources, one in GDA94 projection and
the other in AGD66 projection. I have the original data in shapefile
but store them in PostGIS.
To get the data to align, I am doing an on-the-fly projection with
Mapserver (as defined in my .MAP file - see below). What I would like
to do is actually transform the data so that when I do PostGIS SQL
statements everything still works. I am also assuming that it would
be faster to precalculate/transform my data before I need it.
I attempted to transform the data using ogr2ogr with this command:
ogr2ogr -f "ESRI Shapefile" -s_srs "EPSG:4202" -t_srs "EPSG:4283"
transformed-loc500g.shp loc500g.shp
but it seems to make no difference.
Can anyone suggest either what I am doing wrong with ogr2ogr or an
alternative approach?
from my .map file
MAP
NAME MyMap
IMAGETYPE PNG
EXTENT 144.96 -37.80 144.97 -37.83
UNITS dd
SIZE 500 250
FONTSET "fonts/fonts.list"
INTERLACE OFF
PROJECTION
"proj=longlat"
"ellps=GRS80"
"towgs84=0,0,0,0,0,0,0"
"no_defs"
END
...
LAYER
NAME TOWNS_OUTLINE
CONNECTIONTYPE postgis
CONNECTION "user=postgres dbname=XXXX"
DATA "the_geom from towns_outline"
TYPE LINE
STATUS DEFAULT
CLASSITEM "loc_unique"
LABELITEM "loc_unique"
PROJECTION
"proj=longlat"
"ellps=aust_SA"
"towgs84=-133,-48,148,0,0,0,0"
"no_defs"
END
...
and
from the EPSG file:
<4202>
proj=longlat
ellps=aust_SA
towgs84=-133,-48,148,0,0,0,0
no_defs
<>
<4283>
proj=longlat
ellps=GRS80
towgs84=0,0,0,0,0,0,0
no_defs
<>
Mark
More information about the MapServer-users
mailing list