- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在创建一个 .sql 文件来创建一个新数据库。我的几个表正在使用 Postgis 扩展。当我尝试从命令行创建数据库时:
psql location < location.sql
它在包含地理数据类型的列的表上失败。当我 psql 进入数据库时:
psql location
并从我的 .sql 文件中复制粘贴创建表代码,它可以很好地创建表。我觉得我在这里错过了一个小而重要的步骤
我一直在摆弄我的 .sql 文件,但没有运气解决这个错误
这是我用来创建数据库的脚本:
dropdb location
createdb location
psql -d location -c "CREATE EXTENSION postgis;"
psql -d location -c "CREATE EXTENSION postgis_topology;"
psql location < location.sql
这里是 location.sql 文件中失败的表的片段:
create table public.fips (
fips_id bigserial,
state_code char(2),
county_code char(3),
county_subdivision_code char(5),
place_code char(5),
consolidated_city_code char(5),
longitude double precision,
latitude double precision,
geo_point geography,
area_name text,
PRIMARY KEY (fips_id)
);
geo_point 是它提示的那个。
最佳答案
原来我需要在 geography 数据类型前加上 public。
关于postgresql - "PostGIS Error: type “geography”不存在”使用psql时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56668705/
是否可以在使用 PHP 实现 API 后存储从网站 (Nestoria) 收集的数据?我可以使用 PHP 提取数据并将结果显示在网络浏览器上,但我需要将它们转储或保存到我的 PostGIS 数据库中。
我正在尝试清理 PostGIS 数据库中的一些地理空间数据。由于地理编码过程中的一些不精确性,一些必须落在特定区域边界内的点被映射到非常接近,但在该区域的定界多边形之外。 我的第一个方法是使用 Pos
我得到一列( latlon ),它是 ST_MultiPolygon . 另一个几何体是一个点,我只想检查它是否在我的 MultiPolygons 内。 我试过: SELECT ST_CONTAINS
我正在使用似乎过于分散而无法有效查询的 radio map 。当我询问一个点是否在多边形内时,响应时间为 20-40 秒(我已经测试了“内”/“包含”/“重叠”)。我使用 PostGIS 和 GeoD
所以我加载了一堆 NHD 数据,几何图形最终变成了 MultiPolygonZM(其他表格的 pointZM 和 areaZM) way geometry(MultiPolygonZM,90091
我需要 PostGIS 中地理数据中心的经度和纬度。格式称为 EPSG 2206,记录中的列是“length”、“shape_area”和“the_geom” 最佳答案 我使用查询来获取经度和纬度。
我正在将 GeoDjango 与 PostGIS 结合使用,并尝试使用多边形从数据库中获取属于其中的记录。 如果我定义一个大于地球面积一半的多边形,则假定多边形的“内部”是我打算作为“外部”的较小区域
我正在使用 ubuntu 12.04,我安装了 postgis2.1 和 postgresql9.1 ......我是所有人的新手!...... 我按照这个教程创建了一个模板数据库:http://li
我正在尝试将一系列线串几何图形与匹配属性(road_name_search 和 road_id)结合起来,然后将合并的线串从以下示例数据连接回 road_id 属性 http://sqlfiddle.
我计划将 GeoServer 与 PostGIS 数据库结合使用,以通过 Web map 服务提供等高线。 我有一个简单的经纬度值网格,我想将其存储在数据库中并绘制轮廓。虽然 GeoServer 用户
我正在尝试启动 GeoDjango 应用程序。我已经在 Lion 上使用 brew 安装了 Postgres 和 PostGIS。我使用 template_postgis 创建了一个数据库:creat
我正在尝试在 Ubuntu Server 12.04 上设置一个 tile 服务器,并且我已经安装了 Postgresql 和 PostGis 以及 Mapnik 和 Osm2pgsql。我正在尝试运
我正在迁移一个项目的连接模式从:使用DriverManager到DataDource。但我收到了这个错误: org.postgis.PGgeometry cannot be cast to org.p
我关注了这个tutorial on the Open shift site .我现在正在尝试添加自己的数据,但运气不佳。我在本地计算机上有一个由 PGAdmin III 管理的 postGIS 数据库
我在通过 geoservers wfs 将 ol3 中的功能发布到 postgis db 时遇到问题。当我运行此代码时,我只能插入 gid(pk) 和 bin 列,但_geom(Geometry) 列
我已经成功设置了一个用于 OSM-Bright 的 postgis 服务器。我必须承认服务器对我来说有点像黑盒子,所以虽然我已经设置好它并且运行良好,但我不知道如何以最佳方式使用它。 在 OSM-Br
我想从 Java 查询 PostGIS/PostgreSQL 数据库。 已安装 PostgreSQL 9.4。 PostGIS 2.1 Bundle for PostgreSQL 9.4 通过 Sta
从 PostGIS 2.1 升级:“错误:尝试重新定义参数“postgis.backend” 我正在尝试升级 AWS RDS 上的 PostGIS 数据库,但在运行 ALTER EXTENSION p
我尝试使用 pgAdmin 4 在 Postgresql 11 上运行 postgis 扩展,但在尝试创建扩展时出现以下错误: Could not access file "$libdir/postg
今天当我尝试从包含几何值的列中进行选择时,我随机开始出现此错误 错误:无法访问文件“$libdir/postgis-2.0” 我的选择之前一直运行良好,但今天才开始出现这种情况。有关如何解决此问题的任
我是一名优秀的程序员,十分优秀!