MapServer and PostGIS GEOMETRY type

Jan Hartmann j.l.h.hartmann at UVA.NL
Mon Oct 29 07:12:53 EDT 2007


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.
> 



More information about the mapserver-users mailing list