Skip to content

millirud/landuse-geocoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

landuse-geocoder

Returns info about territory. Using OSM data

Import data

Download OSM data shapefiles

http:https://download.geofabrik.de/

Import shapefiles into postgre database using gdal

Put shapefiles to gdal data volume and run import to database command

ogr2ogr -progress -append -update -skipfailures -nlt MULTIPOLYGON -f 'PostgreSQL' PG:"host=db user=root password=qwerty dbname=root" -nln public.landuse  data/gis_osm_landuse_a_free_1.shp

Recommend shp files

  • gis_osm_landuse_a_free_1.shp
  • gis_osm_places_a_free_1.shp

API

Get landuse info

/landuse?lat=<lat>&lng=<lng>

Answer

{
    "result": {
        "fclass": "farmland",
        "name": null
    },
    "items": [
        {
            "fclass": "farmland",
            "name": null,
            "area": "3672278.96"
        }
    ]
}

About

Returns info about territory. Using OSM data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published