Select by Polygon (with point shapefile) erratic selection


I’ve found the select by polygon functionality doesn’t seem to work properly, at least with point shapefiles. If you try and use it on one of these it may select the correct nodes the first time, but generally if you then do another selection it doesn’t work - either selecting not enough points, too many points, or points nowhere near the actual selection. I am using MapWinGIS 4.9. I’ve also confirmed it doesn’t work properly in MapWindow 5 either, so it’s not my code.

Addendum: It seems the more points you add in the selection, possibly with shorter distances between them, the better it works.

Rob H

Hi Rob,

Welcome to this forum.

Can you show some code how you are selecting the points.
Then it is easier for us to debug.

Hi Paul,

Thanks for the response. I think it’s going to be difficult to put together a meaningful code example, but as I mentioned it doesn’t work in MapWindow 5 (the desktop product), so you should be able to see it for yourself there…

I’ve created a video of the select by polygon not working in the link below (I also include the shapefile used in the test). You’ll see the first selection does not work properly, the second does work and the third does not:


Rob H

Thanks for the sample data.
I just tried with your net.shp and I can’t reproduce in my version of MW5.

I looked at the GitHub history but can’t find the reason why I don’t have this issue.

Can you wait for the next installer or can you rebuild MapWinGIS yourself?
If needed I can build a new version and send it to you.

Hello Paul,

Many thanks for that. I’m not setup to build MapWinGIS, so I’d really appreciate it if you could build it for me - as I have a small timescale to decide if I can keep this functionality in our software.



In a few hours I’ll make a new installer and send it to you (or share it on Google Drive).
Meanwhile I created a small video:

I’ve created a Win32-only beta installer. It can be downloaded from my Google Drive.

Please let me know if this version is solving your problem or not.

Hi Paul,

Thanks very much for doing that. I’ve tested it quite a lot and it seems to be working very well now which is great. Is it possible to have a 64-bit version (as that’s what we’re deploying)?

Many thanks,

Rob H

Hi Rob,

In a few hours I will make the 64-bit version.
I need to boot my old laptop for this, since my new laptop doesn’t have VS2015 anymore.

I’ll let you know when I’m done.

I’ve created a Win64 beta installer as well. It can be downloaded from my Google Drive as well.

Hi Paul,

Thank you very much for doing this for me. Can confirm the 64-bit version also works for me now.