[fdo-users] FDO PostGIS Provider - edit existing MULTIPOLYGON or MULTILINESTING geometries

Astrid Emde (WhereGroup) astrid.emde at wheregroup.com
Wed Feb 25 06:44:47 EST 2009


Hello list,

are there any news concerning the possibility to edit existing
MULTIPOLYGON or MULTILINESTING geometries?

Are there any activities going on in the Autodesk support network?

It would be nice to get some information from the AutoCAD support network
or from the developer side about the possibilitiy to use MULTI-objects.

If they are not supported currently and will not be supported in the near
future we have to think about an alternative solution, i. e. implement
trigger like Mike descibed (thanks for the help) or change the type of the
geometries. But this would be quite a lot of work. It would be better if
editing on existing MULTIPOLYGON or MULTILINESTING geometries would be
possible.

Thanks for you answer.

Best regards Astrid


On Tue, February 10, 2009 6:03 am, Michael Toews wrote:
> I'm not sure exactly what the issue that you describe is, but if it is any
> help, I have noticed that Map3D 2008 does not always honour single-part or
> multi-part feature types too well. E.g., attempting to add a new
> single-part polygon to a MULTIPOLYGON feature seems to violate PG database
> constraints by adding a POLYGON feature and not a 1-element MULTIPOLYGON
> feature. You might have a related issue where the client app (Map3D in my
> case) is trying to store the wrong geometry type. Try using a BEFORE PG
> trigger.
>
> Here is what I have to work around my issue:
>
> -- An example table with MULTIPOLYGON features
> CREATE TABLE poly_feature
> (
>   gid serial NOT NULL,
>   CONSTRAINT poly_feature_pkey PRIMARY KEY (gid)
> )
> WITH (OIDS=FALSE);
> SELECT
> AddGeometryColumn('','poly_feature','geometry',-1,'MULTIPOLYGON',2);
>
> -- A trigger function that forces POLYGON features into MULTIPOLYGON
> features
> -- also useful for MULTILINESTRING features which have the same issue
> CREATE OR REPLACE FUNCTION make_multifeature_fn()
>   RETURNS trigger AS
> $BODY$BEGIN
>   IF GeometryType(NEW.geometry) IN('POLYGON','LINESTRING') THEN
>     NEW.geometry := Multi(NEW.geometry);
>   END IF;
>   RETURN NEW;
> END;$BODY$
>   LANGUAGE 'plpgsql' IMMUTABLE
>   COST 100;
> ALTER FUNCTION make_multifeature_fn() OWNER TO postgres;
> COMMENT ON FUNCTION make_multifeature_fn() IS 'a workaround for issue with
> AutoCAD Map 3D 2008';
>
> CREATE TRIGGER make_multipolygon_tg
>   BEFORE INSERT OR UPDATE
>   ON poly_feature
>   FOR EACH ROW
>   EXECUTE PROCEDURE make_multifeature_fn();
>
>
> Hope this can help!
>
> -Mike
>
> ----- Original Message -----
> From: "Greg Boone" <greg.boone at autodesk.com>
> To: "astrid emde" <astrid.emde at wheregroup.com>, "FDO Users Mail List"
> <fdo-users at lists.osgeo.org>
> Sent: Monday, 9 February, 2009 07:22:15 GMT -08:00 US/Canada Pacific
> Subject: RE: [fdo-users] FDO PostGIS Provider -
>
> This issue may better be solved through the Autodesk support network.
>
> Greg
>
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Astrid Emde
> (WhereGroup)
> Sent: Thursday, February 05, 2009 9:41 AM
> To: fdo-users at lists.osgeo.org
> Subject: [fdo-users] FDO PostGIS Provider -
>
> Hello list,
>
> I am testing the FDO PostGIS Provider at the moment.
>
> I want to change existing geometries - insert a basepoint, move a point of
> a geometry.
>
> This action works fine with simple geometries like LINESTING or POLYGON (I
> use _pedit, then I choose the geometry and choose the action afterwords).
>
> But with MULTIPOLYGON or MULTILINESTRING I can't choose the geometry.
> After running the _pedit-function, AutoCAd asks me to choose a Polygon,
> but it does not react on my selection.
>
> The question is whether the selection does not work on MULTIPOLYGONs or
> MULTILINESTRINGs or whether there is a trick that I don't now?
>
> Best regards
>
> Astrid Emde
>
>
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>





More information about the fdo-users mailing list