CELEPAR¶
In [ ]:
Copied!
import io
import geopandas as gpd
from owslib.wfs import WebFeatureService
import io
import geopandas as gpd
from owslib.wfs import WebFeatureService
In [ ]:
Copied!
wfs = WebFeatureService(
#
url='https://geoserver.pr.gov.br/geoserver/ows',
version='2.0.0',
)
wfs = WebFeatureService(
#
url='https://geoserver.pr.gov.br/geoserver/ows',
version='2.0.0',
)
In [ ]:
Copied!
list_layers = list(wfs.contents)
list_layers.sort()
list_layers
list_layers = list(wfs.contents)
list_layers.sort()
list_layers
In [ ]:
Copied!
# Obter os dados no formato GeoJSON (ou outro formato suportado)
response = wfs.getfeature(
typename='itcg:municipio_pol_p4674_e50_a2023',
# bbox=(173700, 440400, 178700, 441400),
# srsname='EPSG:28992'
# srsname='EPSG:4326',
srsname='EPSG:4674',
outputFormat='application/json',
)
response
# Obter os dados no formato GeoJSON (ou outro formato suportado)
response = wfs.getfeature(
typename='itcg:municipio_pol_p4674_e50_a2023',
# bbox=(173700, 440400, 178700, 441400),
# srsname='EPSG:28992'
# srsname='EPSG:4326',
srsname='EPSG:4674',
outputFormat='application/json',
)
response
In [ ]:
Copied!
gdf = gpd.read_file(filename=io.BytesIO(response.read()))
gdf.info()
gdf.head(2)
gdf = gpd.read_file(filename=io.BytesIO(response.read()))
gdf.info()
gdf.head(2)
In [ ]:
Copied!
gdf.crs
gdf.crs
In [ ]:
Copied!
gdf.explore()
gdf.explore()