Replies: 1 comment
-
Dear Eric, The way vpolys are generated is the same logic of generating shapefiles in Stata. What you are suggesting is definitely something one needs to think about. One suggestion of the workflow is the following:
a) with the original data using spmap: use original_data or Last point: In my own original raw files, each "layer" (triangles, hull, vor lines, vor poly) are exported to different frames. This is the ideal way to do it since it does not distort the original file. And it also precisely solves the issues you are raising. But until everyone has Stata 17, or is comfortable with frames, I want to avoid this (the command is v15 compatible), although this is my preferred option. |
Beta Was this translation helpful? Give feedback.
-
Dear Asjad,
It is possible to color code the Voronoi Polygons using a categorical variable.
To be able to do this the value of an existing categorical variable has to be matched with the delaynay result variable vpoly_id.
That will work as long as the number of observations is equal to the number of Voronoi Polygons.
However, for those cases when there is more than observation present in one or more Voronoi Polygons more is required to color code them.
For the development and use of algorithms to color code Voronoi Polygons that have multiple observations it is necessary to be able to identify them.
My proposal is to include a delaunay result variable, possibly, called: vgroup_id
For each observation in the delaunay result variable _id, the delaunay Voronoi result variable vgroup_id should have the value of the delaunay Voronoi result variable vpoly_id where the observation is included (positioned).
Having the variables _id and vgroup_id avialable in the result data set enables the user to determine the coded color of each Voronoi Polygon that have multiple observations using various methods.
Best,
Eric
Beta Was this translation helpful? Give feedback.
All reactions