We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d4316d commit 0c3be1cCopy full SHA for 0c3be1c
lib/spatial_features/importers/geo_json.rb
@@ -12,6 +12,8 @@ def cache_key
12
13
def each_record(&block)
14
parsed_geojson.fetch('features', []).each do |record|
15
+ next if record['geometry'].nil? # Skip features without geometry
16
+
17
metadata = record['properties'] || {}
18
name = metadata.delete('name')
19
yield OpenStruct.new(
spec/fixtures/geo.json
@@ -72,6 +72,14 @@
72
]
73
74
}
75
+ },
76
+ {
77
+ "type":"Feature",
78
+ "properties":{
79
+ "name":"Feature C",
80
+ "prop0": "value"
81
82
+ "geometry": null
83
84
85
0 commit comments