[mapserver-users] Changing the "EXTENT" for a layer
Adrian Popa
adrian_gh.popa at romtelecom.ro
Tue Feb 24 23:24:44 PST 2009
Hello all!
I'm trying to display some layers (ESRI Shapefile and MapInfo) in the
same map. The ESRI shapefiles work just fine, and I've used them for a
long time. The new MapInfo layer however has very different "Extent"
values for its coordinates and does not overlap with the original layers
(they should overlap, because they cover the same area).
Here is some output from ogrinfo:
1. A layer that displays ok and for which the coordinates are
longitude/latitude:
[adrianp at server data]$ ogrinfo Limits.shp -so -al
Had to open data source read-only.
INFO: Open of `Limits.shp'
using driver `ESRI Shapefile' successful.
Layer name: Limits
Geometry: Line String
Feature Count: 8718
*Extent: (20.261522, 43.618437) - (29.704897, 48.264780)*
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_1984",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]]
OBJECTID_1: Integer (9.0)
TIP: Integer (4.0)
Shape_Leng: Real (19.11)
2. A layer which displays if I set the Extent parameter in the MAP file
to the values returned by ogrinfo:
[adrianp at server data]$ ogrinfo coverage.TAB -so -al
Had to open data source read-only.
INFO: Open of `coverage.TAB'
using driver `MapInfo File' successful.
Layer name: coverage
Geometry: Unknown (any)
Feature Count: 1
*Extent: (550.002594, 4830850.004496) - (707800.001127, 5318099.996174)*
Layer SRS WKT:
PROJCS["unnamed",
GEOGCS["unnamed",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563],
TOWGS84[0,0,0,-0,-0,-0,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",27],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["Meter",1.0]]
LEGEND: String (50.0)
THRESHOLD: Real (0.0)
COLOR: String (20.0)
Prediction_name: String (50.0)
I don't know how the second layer was generated (perhaps the values in
extent are not longitude/latitude values), but I would like to display
both layers in the same coordinate system.
If I consider the second set of values is longitude/latitude, they make
no sense (unless the surface of Earth is the same as the surface of
Jupiter!).
My question is: can mapserver do the translation of coordinates (by
adding/substracting a fixed value), or do I need to do this with another
system?
If the solution is external to mapserver, what's my next step (some
manuals please!)?
I haven't worked with projections; could this be the cause?
Any help is appreciated, thanks!
Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090225/02e2ccb0/attachment.htm>
More information about the MapServer-users
mailing list