Esri shapefile或简单的shapefile是用于地理信息系统(GIS)软件的流行的地理空间矢量数据格式。有关shapefile的问题最好在GIS Stack Exchange上提出。
有任何方法可以从Leafletjs地图中导出Shapefile?
例如,此页: https://opendatabot.ua/l/7422785500:01:002:0916?from = search 该网站上的地图是使用feaflet.js构建的,它显示了区域边界。有没有办法提取...
> from osgeo import gdal rasin = "location of raster file.tif" output = "destination of clipped raster file.tif" shpin = "location of shapefile.shp" gdal.Warp(output, rasin, cutlineDSName = shpin, format="GTiff", cropToCutline = True) rasterio将是一个不错的选择。 import fiona import rasterio import rasterio.mask src_raster_path = r'LC09_L2SP_007025_20220703_20220705_02_T1_SR_B2.TIF' shp_file_path = "water_polygons.shp" output_raster_path = src_raster_path[:-3] + 'water_masked.tif' with fiona.open(shp_file_path, "r") as shapefile: shapes = [feature["geometry"] for feature in shapefile] with rasterio.open(src_raster_path) as src: out_image, out_transform = rasterio.mask.mask(src, shapes, crop=True) out_meta = src.meta out_meta.update({"driver": "GTiff", "height": out_image.shape[1], "width": out_image.shape[2], "transform": out_transform}) with rasterio.open(output_raster_path, "w", **out_meta) as dest: dest.write(out_image)
i通过不同的时间框架进行调查中有两个形状文件:file_1(具有40多边形)和file_2(带有280多边形)。这些文件中的每个向量都是唯一的ID,并且是...
全部, 我使用 ESRI 世界国家通用形状文件,可在此处获取 使用 GeoPandas shp_file =gpd.read_file('World_Countries/World_Countries_Generalized.shp') 打印(shp_file.crs) CR...
GeoPandas 形状文件无法识别其坐标参考系统 (CRS)
全部, 我使用 ESRI 世界国家通用形状文件,可在此处获取 使用 GeoPandas shp_file =gpd.read_file('World_Countries/World_Countries_Generalized.shp') 打印(shp_file.crs) CR...
我有一个形状文件,我想将形状分成“n”个垂直条。 是否有一个纯Python方法来实现这一点并将输出保存为每个垂直条带的形状文件?我有形状文件...
我正在尝试检查是否在我的形状文件(多重多边形)中找到了点列表(存储在 df.Coords 中)。我在下面写了一段代码,但是,我意识到 python 只读取
我正在尝试检查是否在我的形状文件(多重多边形)中找到了点列表(存储在 df.Coords 中)。我在下面写了一段代码,但是,我意识到 python 只读取
在 C# 中使用带有中文字段名称的 GDAL 创建 Esri shapefile 似乎不可用?
我尝试使用 C# 中的 GDAL 库创建一个 shapefile。我将shapefile字符编码设置为CP936(一种汉字编码),但是当我尝试设置字段名称时,遇到了
如何使用 geopandas 或 cartopy 在 python 中更改此 shapefile?
如何添加浅灰色状态线、将背景更改为白色以及将某些区域更改为某些颜色?这是来自 EPA Level2 生态区地图。我想为每个生态区单独着色
在 R 中使用 sf::st_write 将 tess 对象保存为 shapefile 时出错
我正在使用 spatstat 包在指定区域上创建六边形镶嵌,并计算每个六边形内的点数。之后,我想将曲面细分保存为 shapefile 以在 G 中使用...
我有一个 shapefile,其中包含我可以读取的各种要素类 将 geopandas 导入为 gpd 来自形状优美的进口盒 shapefile =“LAFIS.shp” vect_data = gpd.read_file(shapefile)
我有一个 shapefile,其中包含我可以读取的各种要素类 将 geopandas 导入为 gpd vec_data = gpd.read_file("map.shp") vec_data.head() vec_data['DESCR_ENG'].unique() 我...
我正在尝试读取使用这些步骤创建的 geojson 将 geopandas 导入为 gpd vec_data = gpd.read_file("map.shp") vec_data.head() vec_data['LPIS_name'].unique() sel_crop = vec_data[
我正在尝试读取使用这些步骤创建的 geojson 将 geopandas 导入为 gpd vec_data = gpd.read_file("map.shp") vec_data.head() vec_data['cols_name'].unique() sel_crop = vec_data[
PostGis 3.4.0 Tiger2023状态数据新列geoid/geoidfq不在tiger.state中
我正在加载 2023 年州的人口普查老虎数据。我使用此输出 SELECT loader_generate_nation_script('sh') 作为起点。然后我将 2022 年的参考资料更新为 2023 年,思考可以做什么
我尝试从 Natural Earth 的世界 shp 文件中提取某些国家/地区。 我目前使用的是Windows 10,所以我安装了Python 3.7、gdal来使用ogr2ogr。 我在通讯中输入了以下代码...