Re: shapefile problem [message #69635] |
Thu, 28 January 2010 12:35 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bruce Bowler writes:
> I'll start by saying that this is my first foray into shapefiles and I'm
> probably doing something stooopid.
>
> I'm using Dr. Coyote's excellent software to draw shapes on a map
> thusly...
>
>
> map_set,/noborder
> map_continents,/coast
> provFile="c:\my_idl\longhurst\Longhurst_world_v2_2009"
> drawStates,provFile,statenames='FKLD',attribute_name='PROVCO DE',/fill
>
> And it does a excellent job of drawing the Falkland/Malvinas province on
> the map. In fact it does a very good job of drawing all of the provinces
> on the map, with the exception of 1, BPLR, which is filling everything
> *except* the BPLR province (BPLR == Bi-polar???). I suspect that it's a
> problem with the province vertices.
>
> If you go here, http://www.vliz.be/vmdcdata/vlimar/vlimar.php?
> p=details&id=21450, and scroll the map, it appears that this province is
> unbounded on the northern edge.
>
> Is there an "easy" fix to drawStates that would solve the problem, or
> Is there an "easy" fix to the province definition, or
> Is the solution to go back to the folks who distribute the shapefile and
> have them "close the polygon"
I don't know for sure, and I have no time to follow up this
week, but I think this could happen if the vertices were specified
in the "opposite" order. In other words, clockwise instead of counter-
clockwise. (Or, is the opposite of this?) In any case, you might
check the order of the vertices compared to one of the other provinces
that works correctly.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|