geometry problem when migrating from windows to linux

Gregor Mosheh gregor at HOSTGIS.COM
Thu Aug 16 21:02:08 EDT 2007


Milo van der Linden wrote:
> I have a dataset of two multipolygon layers that work fine on mapserver 
> 4.10.2  on windows. I have uploaded my data to a linux server with the 
> same versions. On the linux server mapserver throws errors when moving 
> around the map.

I've been working with Milo and wanted to add a bit more info.

The error is with some specific records. I demonstrated this by 
converting the original data (MID/MIF format) into PostGIS and then 
filtering by gid. Keep tweaking the gid filter until I figure out which 
records cause a problem, ... Then try to see what the problem is.

* The layer is not using a classitem labelitem, etc. In fact, the 
PostGIS table has only the gid and the_geom columns.

* isvalid(the_geom) and issimple(the_geom) return true for all records 
in the table, including these problematic records.

* Visually examining astext(the_geom) looks fine as best I can tell. But 
reading 200kB of numbers and text isn't a reliable method of testing 
geometries. :)


Now, about the Windows-vs-Linux thing...

Our Linux system is running MS 4.10.0 and GDAL 1.3.2
His Windows is 4.10.2 and GDAL 1.4.1
We both have mapfiles, which connect to the same PostGIS database.
His shows the image, ours gives a 500 error.

Again, the issue is only when certain records would be displayed. 
Viewing the entire world, or another area that doesn't contains these 
records, works fine even on the Linux one.

shp2img replicates the same behavior as Mapserver-via-CGI. If I set the 
extent in the mapfile to the Bermuda Rectangle, shpimg gives a segfault. 
If I set the extent to worldwide or some other rectangle, all is well.

I did build both GDAL/OGR 1.4.2 and Mapserver 4.10.2, and shp2img gave 
the exact same results.

I've also md5sum'd the data files before importing to PostGIS (the ZIP 
came across okay anyway, but let's get paranoid, right?) to verify that 
the dataset is indeed arriving on our server intact.


So, we're baffled!

-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the mapserver-users mailing list