Topology issues, or, I'm doing it wrong
Home › Forums › Natural Earth Map Data › Cultural Vectors › Topology issues, or, I'm doing it wrong
- This topic has 1 reply, 1 voice, and was last updated 14 years, 4 months ago by Nathaniel.
-
AuthorPosts
-
June 15, 2010 at 10:06 pm #3391
ed_hyerParticipantThis project is a great idea, one whose time has come. Very glad to not be dependent on ESRI for something so basic.
I wish I could just show the plot, it would be immediately clear what’s going wrong. I have ingested the Admin0_countries.shp into IDL, and plotting up the polygons, I’d say about 60% of them look good, the rest have discontinuities. The vertices look good, but they don’t make clean polygons.
I am trying to use these data for sorting observations among countries. It seems like I could do it if the country polygons just followed an orderly topology. Am I just using the wrong dataset?
Thanks for any help,
–Edward H.
June 15, 2010 at 10:49 pm #4042
NathanielKeymaster@Ed: Thanks for your comments on the project! The 10m admin do have some topology issues at present and hope to have that fixed in a later version. If you have access to Info license you can run “integrate” on it for a temporary fix. The overlap is not very much, however. But they only apply when zoomed into say 250k scale or 40 times the detail of the actual linework. So you might be getting accurate topology, but not at the right precision. Any feature that falls within a couple miles of the border would be affected, even if the topology were right. For your project I suggest you do a buffer on the border lines and find out what percentage of your thematic points are within the border area (and what are not) to determine if this is a real issue or not. If most of your features aren’t along the border, the admin-0 10m will work fine for you. If this remains a problem, you might use GADM from Berkeley which is to a higher precision (variable).
June 16, 2010 at 12:31 am #4043
ed_hyerParticipantNathaniel: Thanks for the quick reply! OK, the problem I am describing is definitely not a precision issue, and hopefully it is user error. I am directly extracting the vertices from the shapefile, where they are stored as a (2,N) array. I break this into a list of longitude coordinates (0,*) and a list of latitude coordinates (1,*). These coordinates should describe a polygon, BUT– they appear to be somewhat out of order. So, when I try to draw Canada, for instance, it draws a segment along the eastern coast of Canada, and then jumps over and draws a segment along the western coast. The result is a fragmented polygon with multiple intersections. It is these intersections that are the problem– they break up the polygon, and make it impossible to cleanly calculate inside/outside. I suspect, but I am not sure, that this would be a problem in any software.
I do still have some ESRI product, but I haven’t used it in a while, because most of my work is with automated analysis of large datasets, which I used to do with good ol’ AML, but now do mostly with IDL and command-line tools like GDAL.
Am I explaining the problem well enough? I might have to find a space online to upload the graphic, it’s instantly clear from the picture.
–Edward H.
June 16, 2010 at 1:22 am #4044
NathanielKeymaster@Ed: Email me the picture at nathaniel@naturalearthdata.com.
June 16, 2010 at 2:52 am #4045
NathanielKeymaster@Ed: I should also note that there is a special version of admin-0 called “scale ranks” that has an exploded single part version of the countries instead of the “multipart” shapefile that might work well for you. https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-0-details/
June 16, 2010 at 4:22 am #4046
ed_hyerParticipant@Nathaniel: The “scale ranks” is in fact what I wanted. It means that, for instance, I have to process all the points through 459 polygons in order to determine which points are and are not in Canada, but it works!
This is a capability I have longed for in IDL for some time, and now it seems I can have it, thanks to this *excellent* free data set!
Thanks again,
–Edward H.
-
AuthorPosts
You must be logged in to reply to this topic.