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 <[email protected]> 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/