add service Geojson to_polygon
This commit is contained in:
parent
e6cc95fc5f
commit
2bb57b1091
2 changed files with 52 additions and 0 deletions
10
app/services/geojson_service.rb
Normal file
10
app/services/geojson_service.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
class GeojsonService
|
||||
def self.to_polygon coordinates
|
||||
{
|
||||
geo: {
|
||||
type: "Polygon",
|
||||
coordinates: [coordinates]
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue