Subscribe to this thread
Home - General / All posts - MF and PostgreSQL PointZ geometry
276 post(s)
#01-Dec-17 12:49

It seems MF can read well PointZ geometry from PostgreSQL but not write.

I tried to copy (drag and drop) MF table with xyz-points to PostGIS datasource. Table gets created with no data.

Invalid value. Geometry has Z dimension but column does not.

While having PointZ table in PostgreSQL I can view it fine, but I cannot add objects to drawing (error below) nor paste geoms (other attribute values are inserted, geom remains NULL)

ERROR: Column has Z dimension but geometry does not


8,216 post(s)
#01-Dec-17 13:17

This is a known issue that we are planning to address.

Create a table using PostgreSQL (ie, by running SQL in a command window). The table that gets created by copy / paste does not specify that the geometry field is going to contain 3d data. We need additional UI for that / additional properties for queries and scripts.

Once the table is set up to contain 3d data, it should all work seamlessly. The map window will display geometry values, the Record pane will show coordinates including Z, inserting a new geom with Z values will pass those Z values, attempting to insert a new geom without Z values will fill in fake Z values (zeros).

Could you post the backup of a database with the PointZ table that fails to insert new objects?

276 post(s)
#01-Dec-17 15:23

Pg 9.6.6-2, postgis 2.3.3, MF, libpq.dll from gdal 2.2


CREATE SEQUENCE pointz_id_seq;



    id integer NOT NULL DEFAULT nextval('pointz_id_seq'::regclass),

    geom geometry(PointZ,3301),

    CONSTRAINT pointz_pkey PRIMARY KEY (id)





TABLESPACE pg_default;

CREATE INDEX sidx_pointz_geom

    ON pointz USING gist


    TABLESPACE pg_default;


insert into pointz ( geomvalues ( ST_SetSRID(ST_MakePoint(619903, 6463081, 6.28),3301) );

I cannot insert geom with Z interactively. I can paste geoms with z, I cannot paste geoms without z.


8,216 post(s)
#01-Dec-17 15:56

Thanks, we will look into this.

276 post(s)
#01-Dec-17 17:02

a) btw, I could not invoke New Object Dialog in 163.11. Is this expected?

b) In PostGIS I converted points to lines with 'ST_MakeLine(pnt.geom ORDER BY timestmp)'. I can import this table into MF fine. When exporting the table with MF to SHP I get corrupt .shp. I will report directly to tech.


8,216 post(s)
#01-Dec-17 17:10

The dialog moved to the Record pane under Contents. Just start entering the geom, the pane should pop up automatically.

276 post(s)
#01-Dec-17 17:23

Right, of course. But no way to set Z?


5,082 post(s)
#01-Dec-17 19:42

no way to set Z?

Yes, in a second step. Select the object (either in the drawing or select the record in the table) and with the Restrict to selection checkbox checked and the Geom field as the target, use the Set Z template in the Transform panel. ...Setting Z should be added as an interactive feature to the Values or the Coordinates tab for interactive editing.


8,216 post(s)
#02-Dec-17 09:14

That's what we are looking into.

Alt-clicking an existing object with Z values should display / edit them correctly. It's adding a new object that for some reason does not recognize that the object should contain Z values and displays coordinates as XY instead of XYZ - we will fix it.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.