Select to view content in your preferred language

How do I fix null point geometry?

236
3
Jump to solution
2 weeks ago
davedoesgis
Frequent Contributor

I ran a geocode and it created several points that have null geometry. They don't show up on the map, so I cannot place them manually. 

0 Kudos
2 Solutions

Accepted Solutions
davedoesgis
Frequent Contributor

Just updating the geometry of a point turned out to be pretty simple, but took a surprising amount of searching to find.

In this case, I had several points that didn’t geocode (geocode score of zero) that had null geometry and didn’t show up on the map. I was unable to manually place them with the point editing tools, or if there’s a way, it escaped me. I started by selecting the features I wanted to place and opening the field calculator on the Shape field. I calculated the “Shape” field to code_block(!Shape!), with a code block of:

def code_block(shape):

    point = shape.getPart(0)

    point.X = -125

    point.Y = 46.2

    return point

 

This just placed the 4 selected points out in the ocean at that location, just so I had some valid point geometry, and then I moved them by hand to the correct location I determined.

If you know the location's x/y, then you could do something more elegant, one point at a time. 

 

Esri doc (search for “shift”): https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/calculate-field-examples.htm

 

davedoesgis_0-1755734264070.png

NOTE: I took this screenshot a long time ago, back when GP tools just worked on the selected set. Now, there will be a toggle to indicate you are only working on a subset of the data. 

 

 

 

View solution in original post

0 Kudos
CalvinHarmin
Frequent Contributor

If you have a null geometry point feature selected in the Attribute Table, are you able to use the Replace Geometry tool to click on a location in the map?

I tested this just now by creating a new point via the Attribute Table (no geometry provided). I selected the point in the attribute table, activated the Replace Geometry tool (it's one of the standard editing tools in the 'Modify Features' menu or 'Tools' gallery in the Edit ribbon menu), and I was able to click anywhere in the map to give it that point geometry.

CalvinHarmin_3-1755779838282.png

CalvinHarmin_4-1755779845364.png

CalvinHarmin_6-1755779985221.png

CalvinHarmin_5-1755779854240.png

 

 

View solution in original post

3 Replies
davedoesgis
Frequent Contributor

Just updating the geometry of a point turned out to be pretty simple, but took a surprising amount of searching to find.

In this case, I had several points that didn’t geocode (geocode score of zero) that had null geometry and didn’t show up on the map. I was unable to manually place them with the point editing tools, or if there’s a way, it escaped me. I started by selecting the features I wanted to place and opening the field calculator on the Shape field. I calculated the “Shape” field to code_block(!Shape!), with a code block of:

def code_block(shape):

    point = shape.getPart(0)

    point.X = -125

    point.Y = 46.2

    return point

 

This just placed the 4 selected points out in the ocean at that location, just so I had some valid point geometry, and then I moved them by hand to the correct location I determined.

If you know the location's x/y, then you could do something more elegant, one point at a time. 

 

Esri doc (search for “shift”): https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/calculate-field-examples.htm

 

davedoesgis_0-1755734264070.png

NOTE: I took this screenshot a long time ago, back when GP tools just worked on the selected set. Now, there will be a toggle to indicate you are only working on a subset of the data. 

 

 

 

0 Kudos
CalvinHarmin
Frequent Contributor

If you have a null geometry point feature selected in the Attribute Table, are you able to use the Replace Geometry tool to click on a location in the map?

I tested this just now by creating a new point via the Attribute Table (no geometry provided). I selected the point in the attribute table, activated the Replace Geometry tool (it's one of the standard editing tools in the 'Modify Features' menu or 'Tools' gallery in the Edit ribbon menu), and I was able to click anywhere in the map to give it that point geometry.

CalvinHarmin_3-1755779838282.png

CalvinHarmin_4-1755779845364.png

CalvinHarmin_6-1755779985221.png

CalvinHarmin_5-1755779854240.png

 

 

davedoesgis
Frequent Contributor

Good solution. I searched for something like this and didn't find it, which is what led me to the solution I posted. I've worked with Esri software my whole career and seen lots of points placed at Null Island (0, 0), but only rarely get null geometry. I honestly don't know why the Shape field isn't required. It makes no sense to have a point layer with missing geometry, but that's going off on a tangent. 

0 Kudos