After sucessfully converting OSM data to PostGIS as shown in https://github.com/bscpnu/ConvertOsmPostGIS, in this part we display those data to the web.
Features list that will be displayed are as follow: Road, railroad, building, parking, park, industrial, barrier, platform, playing_field, plaza, water, waterway, grass and garden. Those features list are retrieved from tables: human_built, human_landuse, physiography_water, and physiongraphy_life.
First thing first, let's create an index for our data to make it more easily searchable using the following statement
CREATE INDEX human_built_gist ON public.human_built USING gist (geom);
CREATE INDEX human_landuse_gist ON public. human_landuse USING gist (geom);
CREATE INDEX physiography_water_gist ON public. physiography_water USING gist (geom);
CREATE INDEX physiography_life_gist ON public. physiography_life USING gist (geom);
Screenshot
Query : SELECT sym1, COALESCE(name, sym1) As name, ST_AsGeoJSON(geom)::json As geometry FROM public.human_built WHERE geom && ST_MakeEnvelope('"+xmin+"', '"+ymin+"', '"+xmax+"', '"+ymax+"', 4326).
From above figure (point number 4), it can reveal that all the spatial object overlapping with the given rectangle coordinate will be included.



