projection problem
Serkan Girgin
girgink at GMAIL.COM
Fri Dec 16 11:51:14 PST 2005
Hi Frank,
I checked the vertices and the problem is exactly as you guessed, raster and
polygon are matching at the vertices. I will try to add more vertices to the
polygon layer to solve the problem, thank you very much! By the way, this
problem should always be the case if projections of map and data are
different from each other, isn't it? Normally I would expect that on-the-fly
projection algorithms be handling such cases, but as far as I can see this
is not the case. I tried ArcView and it has the same problem too.
Best regards,
---
Serkan Girgin
girgink at gmail.com
-----Original Message-----
From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On Behalf Of Frank
Warmerdam
Sent: Friday, December 16, 2005 4:31 AM
To: Serkan Girgin
Cc: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] projection problem
On 12/15/05, Serkan Girgin <girgink at gmail.com> wrote:
> Hi!
>
> I have a problem with on-the-fly projection and I would be grateful if you
> can help me. In my mapfile there is a raster Landsat image in UTM
projection
> (zone 37N) and a shapefile containing a polygon with the same extent of
the
> raster, again in UTM projection. When I set the overall projection of the
> mapfile to UTM these two layers coincide perfectly as expected (see
> landsat_utm.jpg). But when I change mapfile projection to a different
> projection, e.g. geographic or Lambert Conformal Conic, a shift occurs
> between the layers and they do not coincide (see landsat_lcc.jpg). Do you
> have any idea why this happens? You can find mapfiles that I used below.
Serkan,
I'm not sure from this information, but I would guess that
you get different results because the polygon is only
reprojected at the vertices and then the new polygon is
drawn "straight" between these transformed points. While
the raster is reprojected for each pixel. If the polygon is
big enough, this could account for the displacement.
But if this is the case, you should see the polygon match
up closely with the raster as you near one of the vertices of
the polygon.
Best regards,
--
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list