gdal

Convert NetCDF (.nc) to GEOTIFF

霸气de小男生 提交于 2019-12-20 01:05:52
问题 I have .nc file sizing around 300MB with a couple of datasets ( TEMP , DEWPOINT ) forecast data. I need to convert ( TEMP ) dataset to multiple GEOTIFF (one .tif for each time slice). Here is how the .nc file looks like. Looked into this answer but it seems to be for the whole dataset. I tried GDAL but not sure how to make it work for each time slice. Any thoughts? netcdf4 -python? 回答1: gdal has a gdal_translate option that will allow you to do this to translate the file from .nc to .tiff .

gdal 2.1 Rasterize

非 Y 不嫁゛ 提交于 2019-12-19 21:04:43
问题 Is it possible to set the data type (Byte, Float32) when using gdal.Rasterize in gdal 2.1? Currently, I use gdal.Translate to convert to Byte, but this is inefficient. tif = my/target.tif shp = my/source.shp tiftemp = my/temp/solution.tif rasterizeOptions = gdal.RasterizeOptions(xRes=20, yRes=20, allTouched=True etc.) gdal.Rasterize(tiftemp, shp, options=rasterizeOptions) #translate to Byte data type (not supported by Rasterize?) gdal.Translate(tif, tiftemp, outputType=gdal.GDT_Byte,

android spatialite调试

强颜欢笑 提交于 2019-12-19 18:46:47
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1、直接用gdal转坐标不行 2、建立空库,spatialite的空间元数据可以出现,也许可以直接sql 转坐标(没测试),但却不能用现有程序自动生成表结构。 3、也许可以重新写表结构的生成方法,即现有程序。 来源: oschina 链接: https://my.oschina.net/u/3756527/blog/3145064

Python GDAL: pip install --no-install GDAL fails

我只是一个虾纸丫 提交于 2019-12-19 07:38:07
问题 I am trying to install GDAL in virtual environment based on the various solutions out there. However the download itself already fails: $ pip install --no-install GDAL Here is the pip.log ------------------------------------------------------------ /Users/test/venv/bin/pip run on Sun Jun 2 15:35:15 2013 Downloading/unpacking GDAL Running setup.py egg_info for package GDAL running egg_info writing pip-egg-info/GDAL.egg-info/PKG-INFO writing top-level names to pip-egg-info/GDAL.egg-info/top

Ubuntu 16.04 R Installation: configure: gdal-config not found or not executable

岁酱吖の 提交于 2019-12-19 06:58:23
问题 System info: Ubuntu 16.04 64 bit I'm trying to install rgdal_1.2-16.tar.gz for a research project. I looked here and did sudo apt-get install libgdal1i R CMD INSTALL rgdal_1.2-16.tar.gz * installing to library ‘/usr/local/lib/R/site-library’ * installing *source* package ‘rgdal’ ... ** package ‘rgdal’ successfully unpacked and MD5 sums checked configure: CC: gcc -std=gnu99 configure: CXX: g++ configure: rgdal: 1.2-16 checking for /usr/bin/svnversion... no configure: svn revision: 701 checking

trouble installing “sf” due to “gdal”

﹥>﹥吖頭↗ 提交于 2019-12-19 05:06:33
问题 I can't install the package "sf" on R. Seems there is an issue with gdal. No idea how to resolve it. > install.packages("sf") There is a binary version available but the source version is later: binary source needs_compilation sf 0.4-3 0.5-1 TRUE Do you want to install from sources the package which needs compilation? y/n: y installing the source package ‘sf’ trying URL 'https://cran.rstudio.com/src/contrib/sf_0.5-1.tar.gz' Content type 'application/x-gzip' length 4073881 bytes (3.9 MB) =====

Setting up Django with GeoDjango Support in AWS Beanstalk or EC2 Instance

自古美人都是妖i 提交于 2019-12-19 04:21:45
问题 So I have at one point had this going via Beanstalk, using Amazon Instance (2013.09) ami-35792c5c . At the time this ebextension scripts worked great when placed in the root of your repo in .ebextensions/ 00_repo.config packages: rpm: pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm' remi: 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm' files: "/etc/yum.repos.d/pgdg-93-redhat.repo": mode: "000644" owner: root group: root

How to project and resample a grid to match another grid with GDAL python?

徘徊边缘 提交于 2019-12-18 10:23:10
问题 Clarification: I somehow left out the key aspect: not using os.system or subprocess - just the python API. I'm trying to convert a section of a NOAA GTX offset grid for vertical datum transformations and not totally following how to do this in GDAL with python. I'd like to take a grid (in this case a Bathymetry Attributed Grid, but it could be a geotif) and use it as the template that I'd like to do to. If I can do this right, I have a feeling that it will greatly help people make use of this

pip3 GDAL install failed on Command “python setup.py egg_info” failed with error code 1

♀尐吖头ヾ 提交于 2019-12-18 09:48:39
问题 I have a requirements.txt with python3 package that is used to deploy a webapp that uses GDAL. When I try to install the requirements.txt using pip3 install -r requirements.txt , it fails on per the below error. I'm on Centos 7. I've tried (all in sudo su -) pip3 install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==2.2.4 pip3 install --upgrade setuptools pip3 download GDAL yum install gdal-devel gcc pip3 install GDAL ERROR: Collecting GDAL Using cached https://files

readOGR() cannot open file

给你一囗甜甜゛ 提交于 2019-12-17 17:44:27
问题 wmap <- readOGR(dsn="~/R/funwithR/data/ne_110m_land", layer="ne_110m_land") This code is not loading the shape file and error is generated as Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, : Cannot open file I am sure that the directory is correct one. At the end / is also not there and layer name is also correct. Inside the ne_110m_land directory files I have are: ne_110m_land.dbf ne_110m_land.prj ne_110m_land.shp ne_110m_land.shx ne_110m_land.VERSION