MapWindow Developer Team : MapWindow Discussion Forum
I upgraded my project from 4.7 to 4.8.6 and now sf.GetIntersection returns no results for the same exact code. I checked validity of both shapefiles and they both return ok. Is there some new function that takes the place of the old function? Edit: Furthermore when I c
sf.GetIntersection returns nothing
Posted by:
sindizzy ()
Date: April 23, 2012 02:35PM
I upgraded my project from 4.7 to 4.8.6 and now sf.GetIntersection returns no results for the same exact code. I checked validity of both shapefiles and they both return ok. Is there some new function that takes the place of the old function?
Edit:
Furthermore when I check the resultant shapefile it is Nothing. So
Dim sfRes As MapWinGIS.Shapefile = sfZones.GetIntersection(False, sfTrack, False, MapWinGIS.ShpfileType.SHP_POLYLINE)
returns sfRes = Nothing so I cant even track down what error might be causing it. I just ran it against ArcGIS and the results on that are good.
AGP
Edited 1 time(s). Last edit at 04/23/2012 03:49PM by sindizzy.
Edit:
Furthermore when I check the resultant shapefile it is Nothing. So
Dim sfRes As MapWinGIS.Shapefile = sfZones.GetIntersection(False, sfTrack, False, MapWinGIS.ShpfileType.SHP_POLYLINE)
returns sfRes = Nothing so I cant even track down what error might be causing it. I just ran it against ArcGIS and the results on that are good.
AGP
Edited 1 time(s). Last edit at 04/23/2012 03:49PM by sindizzy.
Re: sf.GetIntersection returns nothing
Posted by:
sindizzy ()
Date: April 25, 2012 03:48PM
ok I went through and checked my shapefile and made sure all shapes were valid. there were three that came up invalid. Interestingly enough I ran the Geometry checker in ArcGIS and that told me all was good.I'm not sure why that is. Probably ArcGIS and MW use different checking algorithms. anyway, I fixed the invalid shapes and still no result. I'm not sure what else to do to troubleshoot this function.
Edit: here is something neat
Dim sfRes As MapWinGIS.Shapefile = sfZones.GetIntersection(False, sfTrack, False, MapWinGIS.ShpfileType.SHP_POLYLINE) bombs with a null return value.
If I try
Dim sfRes As MapWinGIS.Shapefile = sfZones.GetIntersection(False, sfTrack, False, Nothing) then i get something back.
Why does that happen?
AGP
Edited 1 time(s). Last edit at 04/25/2012 04:30PM by sindizzy.
Edit: here is something neat
Dim sfRes As MapWinGIS.Shapefile = sfZones.GetIntersection(False, sfTrack, False, MapWinGIS.ShpfileType.SHP_POLYLINE) bombs with a null return value.
If I try
Dim sfRes As MapWinGIS.Shapefile = sfZones.GetIntersection(False, sfTrack, False, Nothing) then i get something back.
Why does that happen?
AGP
Edited 1 time(s). Last edit at 04/25/2012 04:30PM by sindizzy.
Re: sf.GetIntersection returns nothing
Posted by:
RalphElsaesser ()
Date: September 13, 2012 01:42AM
5 months later ...
I am just having the same problem and it seems to me that Function GetIntersection is returning NULL if there is no shape in the result set. Which means:
Trying to intersect for example a Point shapefile with a polygon shapefile where none of the points is located inside the polygon shapefile is returning NULL instead of an empty result file (with all the fields in it but no record).
Ralph
I am just having the same problem and it seems to me that Function GetIntersection is returning NULL if there is no shape in the result set. Which means:
Trying to intersect for example a Point shapefile with a polygon shapefile where none of the points is located inside the polygon shapefile is returning NULL instead of an empty result file (with all the fields in it but no record).
Ralph
Re: sf.GetIntersection returns nothing
Posted by:
pmeems ()
Date: September 14, 2012 08:51AM
I think it is by design to return NULL if nothing was intersected and thus nothing to return.
Why would you want to return an empty result?
You can check if the result is NULL or not.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Why would you want to return an empty result?
You can check if the result is NULL or not.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Sorry, only registered users may post in this forum.


