# New dev-version of MapWinGIS

**URL:** <https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510>\
**Category:** MapWinGIS\
**Created:** [March 23, 2020, 4:53pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510 "2020-03-23T16:53:38Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [March 23, 2020, 4:53pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/1 "2020-03-23T16:53:38Z")

</div>

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](https://drive.google.com/drive/folders/0B8UeIGgvyx2VQXRDVndvTUVlUFE?usp=sharing)

Look for v5.1.2.

If this version works well we will promote it to a full release.

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 24, 2020, 3:57pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/2 "2020-03-24T15:57:46Z")

</div>

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](https://mapwindow.discourse.group/t/selectshapes-delphi-speed-and-error/502/4)

Groetjes !!

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [March 24, 2020, 4:52pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/3 "2020-03-24T16:52:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 24, 2020, 8:13pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/4 "2020-03-24T20:13:09Z")

</div>

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:

 ![properties](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/d657ea3ed1e94254359ab33cf5d10ae74cb9c185.jpeg)

I hope this gives you a hint…

2d Objects are loaded perfectly…

Greetings

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [March 25, 2020, 4:25am UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/5 "2020-03-25T04:25:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 26, 2020, 2:06am UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/6 "2020-03-26T02:06:22Z")

</div>

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

[https://we.tl/t-2WH3ct838e](https://we.tl/t-2WH3ct838e)

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

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [March 26, 2020, 5:54am UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/7 "2020-03-26T05:54:24Z")

</div>

Hello @AlexBV

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

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 26, 2020, 3:48pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/8 "2020-03-26T15:48:40Z")

</div>

> [@jerryfaust](#):
>
> The zip file is missing the .shx and .prj files.

I am really sorry 🙂  
[04-catastroshx.zip](https://mapwindow.discourse.group/uploads/short-url/tfcmRVEattVEsw5y4iH7YgDFixN.zip) (12.7 KB)

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 26, 2020, 3:59pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/9 "2020-03-26T15:59:06Z")

</div>

Hello @jerryfaust

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

> **[ShapeAgain.zip](https://wetransfer.com/downloads/ffa475ede7d2f47c0175292a0e5c953220200326155430/d78f2d)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [March 26, 2020, 9:42pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/10 "2020-03-26T21:42:52Z")

</div>

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

```

 ![image](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/c2d236794c4dc3ea2d7bffb139393e6deb81cb6b.png)

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](https://mapwindow.discourse.group/t/ecw-can-not-load/432/11) 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,

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 27, 2020, 2:21pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/11 "2020-03-27T14:21:31Z")

</div>

> [@jerryfaust](#):
>
> Thanks for working with me on this.

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

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [March 27, 2020, 2:25pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/12 "2020-03-27T14:25:16Z")

</div>

> [@jerryfaust](#):
>
> 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 will look at it … not familiar … I have to get into… and let you know !!

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [April 1, 2020, 6:16am UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/13 "2020-04-01T06:16:21Z")

</div>

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](https://drive.google.com/file/d/1W2uauA1rBCHncsWJKGXOc20JL_P-jLZa/view?usp=sharing).

Let me know if you have any troubles with it.

Regards,  
Jerry.

---

<div class="post-metadata">

**Author:** ![AlexBV](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@AlexBV](https://mapwindow.discourse.group/u/AlexBV)\
**Post date:** [April 1, 2020, 2:03pm UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/14 "2020-04-01T14:03:43Z")

</div>

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

I will continue testing !!

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [June 2, 2020, 6:32am UTC](https://mapwindow.discourse.group/t/new-dev-version-of-mapwingis/510/15 "2020-06-02T06:32:28Z")

</div>


