[Mapserver-users] PostgIS Layer & MapServer4

Jerod Clabaugh jclabaugh at mac.com
Fri Jul 23 17:44:48 EDT 2004


Steve:

You were absolutely right.  I tried your update suggestion below and 
then reloaded that layer and the points show up where they are 
supposed to.  They are UTM coordinates for southern Belize and I 
checked the shapefile from whence they came and they are listed there 
as 1797821 Northing 298364 Easting in that order in the shapefile's 
attribute table and that shapefile correctly shows the points so I 
was following what I thought to be the right UTM coordinates just in 
inverted order.  I'm half numerically dyslexic and half-idjit  as the 
Brits say.  ;-(( But this is the first time I have run across this 
sort of error and thanks for catching such a silly error.


Cheers,

Jerod


At 2:06 PM -0700 7/23/04, Steven Monai wrote:
>Jerod:
>
>Since removing the EXPRESSION gave no results, maybe the problem is with
>your spatial data. You gave this as an example of a typical point geometry
>in your database:
>
>   SRID=26716;POINT( 1797821 298364)
>
>SRID 26716 refers to the UTM coordinate system, Zone 16. If your example is
>accurate, then I think I do see a problem. UTM coordinates are given in x/y
>pairs called eastings and northings (respectively), measured in meters. The
>way the UTM coordinate-system works, you should rarely (if ever) see
>eastings (x coordinates) greater than 1,000,000. Furthermore, your example
>point lies only 298 km north of the equator (roughly 298,000 meters), which
>seems unlikely. Are your points' eastings and northings transposed?
>
>Try this: Update your point geometry with the following SQL query:
>
>update data_specimen set bbox =
>GeometryFromText('POINT (' || Y(bbox) || ' ' || X(bbox) || ')', 26716)
>where bbox is not null;
>
>
>This should swap the points' x and y coordinates, and may (hopefully) help
>you along.
>
>Regards,
>-SM
>--
>
>
>>  -----Original Message-----
>>  From: Jerod Clabaugh [mailto:jclabaugh at mac.com]
>>  Sent: Friday, July 23, 2004 1:33 PM
>>  To: Steven Monai
>>  Cc: mapserver-users at lists.gis.umn.edu
>>  Subject: RE: [Mapserver-users] PostgIS Layer & MapServer4
>>
>>
>>  Steven:
>>
>>  Thanks but none of this worked.  Using a regular expression, not
>>  using an expression at all, using 'genus' as CLASSITEM in the layer.
>>  No errors, but no data shows up though there are 3 data points for
>>  'Aristolochia' in the database.
>>
>>  I have verified that you can name a geometry column something other
>>  than the classic 'the_geom' as well.  I have the GIST and oid indices
>>  on the table as well.
>>
>>  Any other ideas?  It either can't or isn't pulling the data out
>>  of the table.
>>
>>  Cheers,
>>
>>  Jerod




More information about the mapserver-users mailing list