New dev-version of MapWinGIS

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.

Gode dag !!

Cheching the new version, found the following issues:

  1. OGR 3d shapes from Postgres can not be read.
  2. ECW Images can not be read.
  3. 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

Groetjes !!

Ok. Thank you, @AlexBV

Let’s start with #1. Can you tell me more about the specific geometry type, and if you are getting any error code or callback?

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 hope this gives you a hint…

2d Objects are loaded perfectly…

Greetings

Hello again.

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.

Thank you.
Jerry.

Upps… the file is a little big… Here is the link:

https://we.tl/t-2WH3ct838e

As shapefile works fine… you have to upload it to the postgres… !!

Hello @AlexBV

The zip file is missing the .shx and .prj files.

I am really sorry :slight_smile:
04-catastroshx.zip (12.7 KB)

Hello @jerryfaust

Here are the whole files again… in case the shx did not work !!

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.

  1. Regarding the ECW images, I believe this is a known issue for which we are waiting on an update of the GDAL binaries.
  2. 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?

Regards,
Jerry,

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)

Kindest regards
Alex

I will look at it … not familiar … I have to get into… and let you know !!

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.

It is available for download from my Google drive.

Let me know if you have any troubles with it.

Regards,
Jerry.

It seems to work fine… until now !! Thank you very much @jerryfaust

I will continue testing !!