MapServer and PostGIS GEOMETRY type

Delfos, Jacob Jacob.Delfos at MAUNSELL.COM
Mon Oct 29 15:53:18 PDT 2007


Hi Jan,

Thanks for your reply. But I still need to find out how MapServer will
deal with the records that contain an unexpected geometry type. I could
have a polygon layer pointing to a table which I expect to contain
polygons. But if the geometry type of the table is GEOMETRY, then it
could contain a line object. What will MapServer do?

If I do an attribute query on such a table, will it return matching
records even if the geometry object is a line, though the layer is a
polygon layer?

Regards,

Jacob
 

> -----Original Message-----
> From: Jan Hartmann [mailto:j.l.h.hartmann at uva.nl] 
> Sent: 29 October 2007 20:13
> To: Delfos, Jacob
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] MapServer and PostGIS GEOMETRY type
> 
> Hi Jacob,
> 
> The Mapfile Reference Manual, chapter Layer says 
> (http://mapserver.gis.umn.edu/docs/reference/mapfile/layer)
> 
> ------------------------------------------------------------
> 
> TYPE [point|line|polygon|circle|annotation|raster|query|chart]
> 
>      Specifies how the data should be drawn. Need not be the 
> same as the 
> shapefile type. For example, a polygon shapefile may be drawn 
> as a point 
> layer, but a point shapefile may not be drawn as a polygon 
> layer.Common 
> sense rules.
> 
> ------------------------------------------------------------
> 
> You probably just have to try it out on your data.
> 
> Jan
> 
> Delfos, Jacob wrote:
> > Hi List,
> > 
> > For a particular client I have to translate a lot of 
> MapInfo files into 
> > PostGIS. Some files may contain some different geometries, 
> which ogr2ogr 
> > doesn't like. So I force the geometry type to "GEOMETRY" (-nlt 
> > GEOMETRY). It translates fine, and seems to draw fine in 
> MapServer. But 
> > how does MapServer really deal with it?
> > 
> > If I have a polygon layer, and point it to a PostGIS table 
> that contains 
> > objects of the type "GEOMETRY", does it simply ignore 
> anything that is 
> > not a polygon? What about the results of attribute queries? 
> Would those 
> > be filtered on the geometry type of the layer?
> > 
> > I can avoid using "GEOMETRY type" by translating the files 
> in FME, but 
> > I'd prefer to recommend an Open Source solution.
> > 
> > Regards,
> > 
> > Jacob
> > 
> > 
> > *JACOB DELFOS
> > GIS ANALYST
> > *Maunsell Australia Pty Ltd
> > 629 Newcastle Street, Leederville, WA 6007
> > PO Box 81, Leederville, WA 6902
> > Western Australia
> > ABN 20 093 846 925
> > 
> > Tel     + 61 8 9281 6185
> > Fax    + 61 8 9281 6297
> > _jacob.delfos at maunsell.com_
> > 
> > This email and any attachments are intended solely for the named 
> > recipient and are confidential. The copying or distribution 
> of them or 
> > any information they contain by anyone other than the named 
> recipient is 
> > prohibited. If you have received this document in error, 
> please notify 
> > the sender and delete all copies from your computer system 
> and destroy 
> > all hard copies. It is the recipient's responsibility to check this 
> > email and any attachments to this email for viruses before use.
> > 
> 

This email and any attachments are intended solely for the named recipient and are confidential. The copying or distribution of them or any information they contain by anyone other than the named recipient is prohibited. If you have received this document in error, please notify the sender and delete all copies from your computer system and destroy all hard copies. It is the recipient's responsibility to check this email and any attachments to this email for viruses before use.



More information about the MapServer-users mailing list