Creating polygons for regions

We have a dataset of approximately 150,000 records that lack georeferencing. However, most of the records contain information about a geographical district. Our objective is to create a polygon for each district using this information and add them to the locality fields of each record.

Unfortunately, we haven’t been able to find a good way to accomplish this. While the GEOLocate plugin could be a potential solution, it seems to work better with single locations rather than tens of thousands of records within the same polygon. Additionally, I’m unsure about how GEOLocate saves data about error polygons.
I think I could use this field (these fields) to update our records in SQL, if I knew the exact format it requires.

Can you please help me out with this?

Hi @ZsPapp,

GEOLocate is designed for use with one Locality record at a time as you mention. If you are able to use that plugin to define the polygon you wish to apply to a large number of records, you would need to batch-edit the other records in SQL at this time.

Once a polygon is drawn, the information is saved to the GeoCoordDetails relationship from Locality, in a field called errorPolygon.

For example, this is a valid error polygon:


To store this information, you would need to create a Geo Coord Detail record for each Locality that you wish to add this information to (or update it if it already exists). This can be tricky to accomplish in a large batch update, but if you are an advanced SQL user you likely could add the data in this way.

You may consider storing this information in the Locality table directly if it has a certain Geography to simplify this effort, but it depends on how you want to use this information.

At the moment, the errorPolygon for a region cannot be viewed in GEOLocate after saving, but I have opened a request to allow that functionality (#3242). It may not be of much use for you at this time.

In summary, you can draw a polygon in GEOLocate and then use SQL script to copy the errorPolygon data to any group of records that you wish. I apologize that there is not a more straight-forward answer for this issue.

Let me know if you have more questions about this!

Thank you for your answer. While it may not be a straightforward solution, I appreciate your information about the GeoLocate tool and your suggestion of using SQL to create/update the errorPolygon data to a large number of records. I think it would work for now.

And thanks for opening a request associated to this issue!