今天成功实现了将DAT文件拷贝到空间数据库中;
http://gis.stackexchange.com/questions/39238/how-to-import-shp2pgsql
1 Answer
activeoldestvotes
up vote
9
down vote
accepted
Have you tried -W "latin1" flag? Sometimes the default encoding (UTF-8) doesn't work well. Maybe you'll have better luck with latin1 encoding:
shp2pgsql -I -s 4326 -W "latin1" districts.shp districts | psql -d postgres -U postgres
There's a useful cheat-sheet available here.
Hope it helps..
shareimprove this answer
answered Nov 3 '12 at 17:18
Haziq
795519
1
Hmm.. Have you correctly installed the PostGIS extension to the postgres database? If you haven't: maybe this can help.. – Haziq Nov 3 '12 at 17:45
Usually if make install worked, you can move on to next process (make check is a step prior to make install).. If you can connect to your database via psql/pgadmin3 - that means your installation is a success. Can you move on to the "Create a spatial database" step? I recommend using the EXTENSIONS method.. – Haziq Nov 4 '12 at 15:55
Dude, this has strayed too far from your original question, haha.. It's a little hard to help you here when there's are a lot of variables at play: which version of PostgreSQL are you using?; on what kind of system?; and which version of PostGIS are you trying to install? It seems like it didn't recognize the "CREATE EXTENSION" syntax.. Does typing only: psql -d geocoding -U postgres gets you into the geocoding database successfully? – Haziq Nov 4 '12 at 16:50
My bad. Then you should follow the 2.5. Create a spatially-enabled database on PostgreSQL lower than 9.1 section.. If you still run into problems I'd suggest that you open a new question - so you can get better answers ;) – Haziq Nov 4 '12 at 16:56
分享到:
相关推荐
基于 ,通过定期的循环备份将PostgresSQL备份到本地文件系统。 通过在POSTGRES_DB设置数据库名称(用逗号或空格分隔),从同一主机备份多个数据库。 支持以下Docker架构: linux/amd64 , linux/arm64 , linux/...
flink cdc postgres 数据同步 jar包,2021年最新版
后计划将Postgres模式转换为... currentSchema=public table_name 提示:您可以使用npx postgres-schema-ts <args> > schema.ts将postgres-schema-ts的输出通过管道传输到文件中演示版对于以下SQL模式: CREATE TABL
Monit脚本将备份作业添加到cron。 备份存储在/var/vcap/store/postgres/pg_dumps 用法 对于每个BOSH部署,添加以下内容: releases : - name : postgres-backup version : latest ... 如果使用带有bosh bosh ...
z.2020-10-22.postgres-xl-docker::warning:Postgres-XL上游自2019-08-08起未更新,邮件列表上的各种重要消息都未得到解答。 因此,该项目现在已存档
flink-connector-postgres-cdc-1.4.0.jar
flink-sql-connector-postgres-cdc 2.5-SNAPSHOT
这个Node.js工具的主要目标是通过利用psql和复制本机实用程序将多个JSON数据文件导入Postgres表中,以便随后可以通过在表级别运行Postgres操作来处理和提取数据。 因此,无需通过以记录级别运行单个操作来重新发明...
postgres-kafka-demo:关于如何将表从Postgres到KafkaKSQL流回Postgres的完全可重复的分步演示
django-postgres-metrics 一个Django应用程序,它公开了许多PostgreSQL数据库指标。背景在大会上,( 发表了“ ”的演讲。 在他的演讲中,克雷格(Craig)指出了一系列指标,应该了解一下为什么PostgreSQL数据库可能...
将此行添加到您的应用程序的Gemfile中: gem "activerecord-postgres-dump-schemas" 然后执行: $ bundle 用法 这会添加一个config.active_record.dump_schemas选项,您可以在config/application.rb文件中定义该...
docker-postgres-osm Docker的基础...然后启动容器: # docker run -d --name postgres-osm openfirmware/postgres-osm然后用postgresql-client测试: # docker run -i -t --rm --link postgres-osm:pg --entrypoi
postgres-kv-poc:基于Postgres的键值存储的PoC,因为为什么不:D
postgres-async-driver-异步PostgreSQL Java驱动程序 Postgres-async-driver是PostgreSQL非阻塞Java驱动程序。 该驱动程序支持连接池,准备好的语句,事务,所有标准SQL类型和自定义列类型。 下载 上提供了Postgres...
参考在您的机器/集群上设置Apache Kafka(使用Kafka Connect) 从安装Debezium PostgreSQL连接器运行Apache Kafka和Kafka Connect 在PostgreSQL中创建表transactions和customers (SQL文件) 使用请求主体向您的...
:four_leaf_clover: 代码覆盖率 Django版本2.0、2.1、2.2、3.0、3.1 Python版本3.6、3.7、3.8 :open_book: 文献资料 :warning: 升级 :chequered_flag: 安装 :fire: 产品特点 :droplet: 未来的增强django-postgres-...
曾经风靡一时的MPP解决方案Greenplum是基于postgres-xl的8.2版本封装的,已经停止更新,逐渐被Postgres-XL新版本取代。 Postgres-XL是开源的postgresql集群,是由多个独立的PostgreSQL实例组成,它们分布在不同的...
当 couchdb 更改时,它还将更新 postgres 表,因此可以将其置于 cron 作业中以保持 postgres 表与 couchdb 同步 - 在 postgres 中需要 jsonb 字段类型。 如果不存在具有以下结构的表,将在 postgres 中创建表: ...
节点红色贡献postgres多用于查询节点,具有多个查询支持...安装在您的Node-RED安装的根目录中运行以下命令npm install node-red-contrib-postgres-multi用法将查询组合为msg.payload上的对象数组: msg.payload = [ {