我正在尝试运行一个ogr2ogr命令,该命令需要
用足够新的空间构造的格但尔,使圣徒有效
函数---
discussion groups
,这似乎
to be 4.0+
然而,gdal在
ubuntugis
有着现代版的格达尔
$ gdalinfo --version
GDAL 2.2.4, released 2018/03/19
我有一个现代空间:
$ sudo apt-get install libspatialite-dev spatialite-bin libspatialite7
... already installed
$ spatialite
SpatiaLite version ..: 4.3.0a Supported Extensions:
但是
ogr2ogr
命令似乎不是用spatialite的版本编译的,spatialite在repos中是一个独立的二进制文件,而是一些更老的版本。(我不知道如何检查它是用哪个版本编译的,只知道
this command that succeeds when it is up to date, fails
)
这是我的档案:
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y && apt-get update \
&& apt-get install --yes gdal-bin curl \
&& curl -LKS 'https://github.com/OpenDataDE/State-zip-code-GeoJSON/raw/master/ks_kansas_zip_codes_geo.min.json' -o ks_kansas_zip_codes_geo.min.json \
&& ogrinfo --version \
&& ogr2ogr -f GeoJSON -dialect sqlite -sql "select ST_MakeValid(geometry),STATEFP10,ZCTA5CE10,GEOID10,CLASSFP10,MTFCC10,FUNCSTAT10,ALAND10,AWATER10,INTPTLAT10,INTPTLON10,PARTFLG10 from \"ks_kansas_zip_codes_geo.min\"" clean.json ks_kansas_zip_codes_geo.min.json
我可以在repos中更改什么,或者如何手动编译
gdal
拥有一个包含
ST_MakeValid
功能?
笔记
正在收集可能相关的搜索结果:
Dockerfile的更新
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y \
# # INSTALLING GRASS DOES NOT SEEM HELPFUL
# && add-apt-repository ppa:grass/grass-devel -y \
&& apt-get update \
&& apt-get install --yes curl git autoconf libtool \
# # TRIED RTTOPO FROM HERE:
# # http://postgis.17.x6.nabble.com/Why-can-t-PostGIS-configure-find-libgeos-c-td3552982.html
# # AND HERE:
# # https://gitlab.com/rttopo/rttopo
# # DOES NOT SEEM FRUITFUL
# apt-get install --yes libgeos-dev \
# && git clone https://gitlab.com/rttopo/rttopo.git \
# && cd rttopo && ./autogen.sh && ./configure --enable-rttopo=yes --with-geosconfig=/usr/bin/geos-config && make && make install \
# && cd \
&& apt-get install --yes gdal-bin \
&& curl -LKS 'https://github.com/OpenDataDE/State-zip-code-GeoJSON/raw/master/ks_kansas_zip_codes_geo.min.json' -o ks_kansas_zip_codes_geo.min.json \
&& ogrinfo --version \
&& ogr2ogr -f GeoJSON -dialect sqlite -sql "select ST_MakeValid(geometry),STATEFP10,ZCTA5CE10,GEOID10,CLASSFP10,MTFCC10,FUNCSTAT10,ALAND10,AWATER10,INTPTLAT10,INTPTLON10,PARTFLG10 from \"ks_kansas_zip_codes_geo.min\"" clean.json ks_kansas_zip_codes_geo.min.json