Re: county boundary

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 12 2013 - 14:46:25 MDT

Hi,

I don't have a county shapefile handy, but attached is an example using the states.shp from the National Atlas. It show how to extract the boundary for the state of Kansas. Example output is below.

In general, you find the indices of the counties you are interested in. Loop over those looking at the "geometry" variable to find out where the indices of the polyline segments begin, and how many there are for the county. In general, you loop over the number of segments to find in "segments" where the N'th segment begins and how many coordinates is consists of; these values tell you the indices in the "x" and "y" variables for that boundary segment.

HTH -- Rick

On Aug 12, 2013, at 2:19 PM, "Luo, Chao" <chao.luo@eas.gatech.edu> wrote:

> Thanks for your suggestions! Actually, I want to print out some counties's boundary (lat/lon), so I can average my model simulated grid particulate data based on county level. I am not sure if it can be done by NCL with shape file. Any suggestions are very appreciated!
>
> cl
>
> ----- Original Message -----
> From: "Rick Brownrigg" <brownrig@ucar.edu>
> To: "Chao Luo" <chao.luo@eas.gatech.edu>
> Cc: "ncl-talk Talk" <ncl-talk@ucar.edu>
> Sent: Monday, August 12, 2013 1:04:36 PM
> Subject: Re: county boundary
>
> Hi,
>
> I'm not certain I understand what you want to do. Just plot one county boundary in particular? You might take a look at example 2 for how to selectively plot elements out of a shapefile, based upon associated database attribute:
>
> http://www.ncl.ucar.edu/Applications/shapefiles.shtml
>
> HTH -- RIck
>
> On Aug 12, 2013, at 1:39 PM, "Luo, Chao" <chao.luo@eas.gatech.edu> wrote:
>
>> Hi,
>>
>> I am able to plot highway and county boundary by using shp file (in101053.shp) and setup map dataset (Earth..2) from NCL, and was wondering if we can print out one county boundary data (lat/lon) from these two datasets.
>>
>> Thanks,
>>
>> cl
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon Aug 12 14:46:35 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 14 2013 - 18:35:09 MDT