Problems with mapserver and oblique projections
Steve Roberts
sroberts at UCAR.EDU
Sun Dec 10 11:39:04 PST 2006
On Sat, 9 Dec 2006, Frank Warmerdam wrote:
> Steve Roberts wrote:
>> Adding the following code to the subroutine msProjectRect in mapproject.c
>> just before the line "if( failure > 0 )" would do the trick:
>
> Steve,
>
> Would you mind submitting this as a bugzilla bug report, ideally along
> with a small map+dataset demonstrating the problem. Something I could
> include in the test suite (ie. < 30K of data or so).
Frank,
I can give it a try. But I will be out of the office for the next week so
I will not be able to get to it for a couple of weeks.
>
> I'm concerned that the patch may do undesirable things in some cases,
> but I'd like to put it in place. However, given the risks, I want to
> keep a good "documentation and test" trail for the changes.
I'm not entirely happy with this solution. Maybe a better solution would
be to not reproject the map bounds to a lat/long bound but instead project
layer's lat/long bounds to the map's projection and do the filter checking
in the maps projection domain. This might minimize all these ugly North
Pole/South Pole/Dateline issues. But I imagine this would be viable only
if the data layer's lat/long bounds were readily available without having
to reproject the entire dataset. I know shapefiles have this information
in their header. But can this be assumed to be available for all data
types?
>
> Note that msReprojectRect() is used for things other than just search
> rectangles for features, so the -180 to 180 problem across the dateline
> could be even serious than false positives in the search sometimes.
Should this be a separate bug report?
I should mention this "fix" I propose does not entirely solve the
graticule problem. The graticule labels are still filtered out in these
types of projections for the same reason as the data. But the filtering is
done in mapgraticule.c so a similiar fix would need to be included here.
Also the graticule gets messy with various artifacts and illogical
labeling when using a lat/long grid on a non-latlong projection which is
probably a whole separate issue.
>
> Best regards,
>
Take care,
Steve
More information about the MapServer-users
mailing list