PostGIS

How to Catch ST_MAKEPOLYGON Error in BigQuery

做~自己de王妃 提交于 2020-06-24 16:02:01
问题 I am using ST_MAKEPOLYGON function in BigQuery as follows: with data AS ( SELECT 61680 AS id, 139.74862575531006 AS lon, 35.674973127377314 AS lat union all SELECT 61680, 139.75087881088257, 35.673909836018375 union all SELECT 61680, 139.747037887573, 35.6765767531247 union all SELECT 61680, 139.75308895111, 35.6813525780394 union all SELECT 61680, 139.747509956359, 35.6798884869144 union all SELECT 61680, 139.754590988159, 35.6799930657428 union all SELECT 61680, 139.754977226257, 35

How to Catch ST_MAKEPOLYGON Error in BigQuery

梦想与她 提交于 2020-06-24 16:00:32
问题 I am using ST_MAKEPOLYGON function in BigQuery as follows: with data AS ( SELECT 61680 AS id, 139.74862575531006 AS lon, 35.674973127377314 AS lat union all SELECT 61680, 139.75087881088257, 35.673909836018375 union all SELECT 61680, 139.747037887573, 35.6765767531247 union all SELECT 61680, 139.75308895111, 35.6813525780394 union all SELECT 61680, 139.747509956359, 35.6798884869144 union all SELECT 61680, 139.754590988159, 35.6799930657428 union all SELECT 61680, 139.754977226257, 35

Getting all Buildings in range of 5 miles from specified coordinates

纵饮孤独 提交于 2020-06-22 03:54:41
问题 I have database table Building with these columns: name , lat , lng How can I get all Buildings in range of 5 miles from specified coordinates, for example these: -84.38653999999998 33.72024 My try but it does not work: SELECT ST_CONTAINS( SELECT ST_BUFFER(ST_Point(-84.38653999999998,33.72024), 5), SELECT ST_POINT(lat,lng) FROM "my_db"."Building" LIMIT 50 ); https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list.html 回答1: Why are you storing x,y in separated columns? I would

Getting all Buildings in range of 5 miles from specified coordinates

馋奶兔 提交于 2020-06-22 03:52:46
问题 I have database table Building with these columns: name , lat , lng How can I get all Buildings in range of 5 miles from specified coordinates, for example these: -84.38653999999998 33.72024 My try but it does not work: SELECT ST_CONTAINS( SELECT ST_BUFFER(ST_Point(-84.38653999999998,33.72024), 5), SELECT ST_POINT(lat,lng) FROM "my_db"."Building" LIMIT 50 ); https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list.html 回答1: Why are you storing x,y in separated columns? I would

ERROR: array size exceeds the maximum allowed (1073741823)

丶灬走出姿态 提交于 2020-05-29 05:47:04
问题 I'm trying to dissolve boundaries of a table of polygons which are ST_Buffers of 5km radius and dump them into another table. The first table contains around 10 million polygons. The table that contains the polygon is: CREATE TABLE poly_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) ); Here's the table that I want to create: CREATE TABLE buffer_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) ); INSERT INTO buffer_5km(gid

Inserting and selecting PostGIS Geometry with Gorm

早过忘川 提交于 2020-05-25 17:12:11
问题 I've been trying to find a way to insert and retrieve geometric types using Golang, and specifically the library gorm. I'm also attempting to use the library orb that defines different types for geometries, and provides encoding/decoding between different formats. Orb has Scan() and Value() methods already implemented for each type. This allows go's Insert() and Scan() functions to work with types other than primitives. Orb expects however to be using geometry represented in the well-known

How do I convert a latitude/longitude pair into a PostGIS geography type?

只愿长相守 提交于 2020-05-09 17:54:22
问题 I'm trying to load a bunch of latitude/longitude pairs into a PostGIS geography type so as to be able to query by location. In particular I have a table with float latitude and longitude columns and a geography(Point, 4326) column. I would like to do update mytable set geography = ??? The documentation appears to suggest that the following should work: update mytable set geography = ST_GeogFromText('POINT(' || latitude || ' ' || longitude || ')'); It doesn't. I don't know what it's

使用Docker部署OpenStreetMap服务器

有些话、适合烂在心里 提交于 2020-05-07 20:32:20
上个月,老师让我做了Docker的OSM服务器搭建,当时边踩坑边记录,最终搞定了部署,遂博客记录。 一、安装并配置Docker 本部分介绍centOS 7环境下docker的安装步骤,内容来自 http://www.runoob.com/docker/docker-tutorial.html ,其他环境下的安装,也可参考该地址。 如果你已经安装好docker。可以跳过此部分。 在终端使用 uname -r 查看你centOS内核版本,需要centOS 7 64位,内核版本3.10或以上 移除就的Docker版本 sudo yum remove docker \ docker - client \ docker -client- latest \ docker - common \ docker - latest \ docker -latest- logrotate \ docker - logrotate \ docker - selinux \ docker -engine- selinux \ docker -engine 安装一些必要的工具: sudo yum install -y yum -utils device-mapper-persistent-data lvm2 添加软件源信息: sudo yum -config-manager --add-repo http:

学习GeoServer遇到的问题及答案

情到浓时终转凉″ 提交于 2020-05-02 02:57:22
简介:本文的记录学习GeoServer遇到的问题,如果已有答案将会附上。 1.GeoServer介绍?,功能? GeoServer 是 OpenGIS Web 服务器规范的 J2EE 实现,利用 GeoServer 可以方便的发布地图数据,允许用户对特征数据进行更新、删除、插入操作,通过 GeoServer 可以比较容易的在用户之间迅速共享空间地理信息。 具有一下特征: 兼容WMS和WFS特性 支持PostGIS、Shapefile、ArcSDE、Oracle、VPF、MySQL、MapInfo 支持上百种投影 能够将网络地图输出为JPEG、GIF、PNG、SVG、KML等格式 能够运行在任何基于J2EE/Servlet容器之上 2.GeoServer如何部署? 参考下面博客部署,GeoServer的war部署方式类似普通java开发的web服务,但是要注意jdk版本问题。 https://www.cnblogs.com/kkyyhh96/p/6379515.html 3.GeoServer数据源介绍? s矢量数据源 Directory of spatial files (shapefiles) - Takes a directory of shapefiles and exposes it as a data store,文件夹下所有shp文件 GeoPackage -

WFS: postgresql(postgis)和shp文件查询效率对比

∥☆過路亽.° 提交于 2020-04-29 14:28:29
对GeoServer上的WFS的各种数据源查询效率感兴趣,做个测试。本次测试了Postgresql、geopackage、shp文件三种数据源的查询效率,无论是本机还是服务器环境,pg存储查询效率都比shp要好。 环境 操作系统 本机=Windows 10 专业版 1903 服务器=Windows Server 2016 CPU 本机=i7 9700 服务器=L5xxx 内存 本机&服务器 = 32GB 硬盘 本机=512SSD 服务器=1TB机械 geoserver版本:2.16 pg版本:10.x 网络环境:公司局域网 代码测试环境:Cesium 1.68 原生自带的请求方法 Cesium.Resource.fetchJson() 测试环境:Microsoft Edge 84.0.488.1 Dev 预备知识 WFS WFS的cql_filter过滤条件 shapefiles数据信息 数据名 数据体积 数据量 EPSG 非OBJECTID属性个数 boundary_vill_sparse 67.9MB 31383 4490 12 village_mz_sparse 17.0MB 6246 4490 12 本文基于公司保密数据进行测试,就不提供数据了,感兴趣的朋友可以用全国县级数据进行模拟。 数据预览: 数据入库要求: 均建立索引 wfs模糊查询效率对比(本机) 数据名称 数据源