我创建了一个连接到Geoserver和PostGIS数据库的django应用程序。其目的是创建一个使用Leaflet,django和PostGIS连接的web应用程序。我将数据添加到PostGIS并导入do django。但是,每次出现以下错误时: Object 'parsererror' Error: getJson was not called
at Function.error (jquery.min.js:2)
at e.converters.script json (jquery.min.js:2)
at jquery.min.js:2
您好:
我有以下几点:
带有每个国家边界的世界的形状文件
--已成功将shapefile导入PostGIS数据库
--可以通过Openlayers在浏览器中显示世界地图。
2数据(CSV)文件,其中每个记录都有
a. birth country,
b. gender,
c. lat and long of the country of birth (which matches the lat & long in the shapefile)
我正在尝试找出最好的方法来显示地图,其中每个国家(基于CSV数据)有100人或更多的人,比如红色或绿色……
所以我的问题是:
如果我用CSV数据创
在django 1.9应用程序中设置geodjango时,我面临这个错误。
我的应用程序生活在一个亚马逊EC2实例和一个RDS postgres实例中。
错误是:
django.core.exceptions.ImproperlyConfigured: 'django.contrib.gis.db.backends.postgis' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql'
我的模型:我在这里创建了3个模型,当我迁移时,我得到了错误。
from django.contrib.gis.db import models
from django.contrib.gis.db.models.fields import RasterField
class WorldBorder(models.Model):
# Regular Django fields corresponding to the attributes in the
# world borders shapefile.
name = models.CharField(max_len
我正在尝试将栅格的postgreSQL数据库导入到CloudSQL中,以便从云中对它们进行栅格分析。我在努力 CREATE EXTENSION postgis_raster; 但是得到以下错误 ERROR: could not open extension control file "/share/extension/postgis_raster.control": No such file or
directory 我假设CloudSQL上没有任何对postgis_raster的支持,但我找不到任何关于它的具体信息。现在,我想我只是将我的栅格转换为点shapefile。
我们正在将一大堆ArcGIS shapefile导入到PostGIS中,并使用shp2pgsql进行动态转换。问题是,如果shapefile有任何环形自交点,导入就会阻塞:
NOTICE: Ring Self-intersection at or near point -80.1338 25.8102
ERROR: new row for relation "place_shapes" violates
check constraint "shape_is_valid"
我们该如何解决这个问题呢?
我想用下面的命令行从postgresql数据库中转储一个shapefile:
pgsql2shp -f output.shp -h localhost -u postgres -P admin parcel "SELECT * FROM parcel.export_output WHERE ParcelNoEng=116"
但它继续显示错误:
ERROR: function postgis_version() does not exist
LINE 1: SELECT postgis_version()
^
HINT: No function
我在Open发行版上安装了PostGIS,以便为应该包含空间数据库的项目做准备,因此我听说需要PostGIS库来实现“空间功能”。
我想部署一个在django中完成的开源应用程序,我得到了一个:
OSError: libgdal.so.1: cannot open shared object file: No such file or directory
我当前的环境设置是:
Linux OpenSUSE (最后一个版本)
显然安装了带有django的Python
PostGIS通过.tar安装(最后一个版本)
我已经在PostGIS的最终版本中安装了所有的需求(GEOS,Pr
我在heroku上部署我的GeoDjango应用程序有困难(使用免费Dyno,但如果有必要,我可以更改)。当我执行push heroku master --force时,我得到了以下错误:
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
Error was: cannot import name 'GDALRaster
我在R 4.0.4 - sp v 1.4-5,rgdal 1.5-23。我使用rgdal包加载了一个shapefile,然后尝试简单地应用spTransform(),但我得到了一组无法摆脱的荒谬的警告。有人对此有什么见解吗?
options("rgdal_show_exportToProj4_warnings"="none")
library(rgdal)
library(sp)
## Shapefile has a projection of WGS84
X <- readOGR(dsn=".", layer="myshapef