Several changes have been made, mostly by @jerryfaust so we created new installers for MapWinGIS.
Because most changes have not been thoroughly tested we created a dev-version, available at my Google Drive
Look for v5.1.2.
If this version works well we will promote it to a full release.
Cheching the new version, found the following issues:
OGR 3d shapes from Postgres can not be read.
ECW Images can not be read.
64 bits ocx is not working very well for example function selectshapes.
(32 bit working fine). I posted the issues somewhere here SelectShapes Delphi Speed and Error
Lets start with the connection: My original connection string was:
ConnSt := ‘PG:host=localhost port=5432 schema=public dbname=jilo_db user=postgres password=pas’;
…does not connect anymore, but if I take out the port and the schema …then gets connected:
ConnSt := ‘PG:host=localhost dbname=jilo_db user=postgres password=pas’;
After connected, I could browse the tables without a problem.
PoylineZM are categorized as PolylineZ and they are displayed good !!!
PointZM are categorized as PointZ and they are displayed good !!
PolygonsZM are read and categorized as PolygonZ, (no error], but are not displayed and limits are 0.0 0.0 0.0 0.0 0.0 0.0
I am using this code to load:
for I := 0 to OGRL.Count-1 do Begin
if OGRL.Selected [I] then Begin
sql := OGRL.Items [i]; //these are the names of the tables
Lay := Map1.AddLayerFromDatabase(ConnSt,sql,true) ;
OGRL.Selected [i] := False
End;
End;
Layer seems to be good no error but does not display and these are the properties:
I don’t see anything obvious in the code that looks problematic. I have set up a basic Postgres database. Can you send me a layer or shapefile of the polygon layer you are working with? I can then step through and find out exactly why it is failing.
Ok. I found a missing case in the code. This layer was a MultiPolygonZM, which had to be broken down into it’s constituent PolygonZM geometries (ultimately being converted into multiple polygon shapes within a SHP_POLYGONZ shapefile). Here it is, loaded from PostGIS:
Dim ds As New OgrDatasource()
If ds.Open("PG:dbname='ThreeD' host='localhost' port='5432' user='postgres' password='pwd'") Then
Dim ogr As OgrLayer = ds.GetLayerByName("03-catastro")
If ogr IsNot Nothing Then
Dim sf As Shapefile = ogr.GetBuffer()
AxMap1.AddLayer(sf, True)
End If
End If
I’ll put out another ‘develop’ build for you to work with.
Thanks for working with me on this.
Regarding the ECW images, I believe this is a known issue for which we are waiting on an update of the GDAL binaries.
Regarding the 64-bit OCX, I confess I have not yet looked into that. Have you tried using the Shapefile.GetRelatedShapes2 method, at least to compare performance and results?
I thank you to pay attention on this matters and happy to be able to assist … @jerryfaust
I suspected that it could be an issue of the size of a couple of polygons… !
Currently I am working in other issues… Is there any development on making polygons from polyline data ? … I know postgis has something, but I believe the data has to be very clean and noded… To node a huge quantity of data is not an easy task… I believe posgis can do it but the data must be carefully given in order to succeed… (Even Qgis can not polygonize my files, only ArcMap has a beautiful and successful algorithm)
I’ve built a 32-bit ‘develop’ version of the OCX, which contains the additional fixes for multi-point and multi-polygon geometries loaded from OGR. Being just slightly newer than what Paul put out (v5.1.2), I have labeled this one v5.1.2.1.