Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ID creation with shp2dta


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: ID creation with shp2dta
Date   Thu, 6 Sep 2007 15:02:36 +0200

Hello Friedrich,

the rule appears to be quite simple:

                if `"`genid'"' != "" {
                        generate long `genid' = _n
                        sort `genid'
                }

it would be quite surprising if you get any variation in the assigned
IDs, but let us know if you do.

Also, if Mr. Kevin Crow from Stata Corp reads this, may I suggest an
option to skip the null-shapes, rather than breaking with an error
message? Some polygon simplification software deletes the polygon
shapes (type 5) and replaces them with null shapes (type 0) which
makes the shape files unsuitable for shp2dta, but the fix is really
simple: just to skip those shapes.

Best regards,
   Sergiy Radyakin



On 9/5/07, Friedrich Huebler <fhuebler@gmail.com> wrote:
> The program -shp2dta- from SSC converts map shapefiles (SHP and DBF)
> to Stata format. I have a question about the -genid(newvarname)-
> option. What is the rule for the creation of these IDs? I want to be
> certain that the IDs always identify the same geographic regions, no
> matter how often -shp2dta- is run to convert the original shapefiles,
> because I use the IDs to merge the map files with other data.
>
> Friedrich
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index