Tag Info

Hot answers tagged

6

There's two things going on here: the GIST API in PostgreSQL and the bindings of types to that API for the purposes of building an R-Tree. PostGIS necessarily uses the PostgreSQL GIST API. That's what it's for. That way we don't have to worry about transaction management or writing things to disk or all the other messy important things involved in ...


3

The difference is the true increase of school entries in the database. It has increased from 592443 to 592672. That's 0,04% increase, and can be considered as normal. Keep an eye on the time stamp in the upper right corner: at present time, you still see the count from last night. It might be that someone has retagged some building = school to amenity = ...


2

In the PostGIS documentation it says: PostgreSQL supports three kinds of indexes by default: B-Tree indexes, R-Tree indexes, and GiST indexes. ... GiST (Generalized Search Trees) indexes break up data into "things to one side", "things which overlap", "things which are inside" and can be used on a wide range of data-types, including GIS ...


2

No and yes. You can configure pgadmin to call external programs, like shp2pgsql-gui, out of a menu option, which can make things easier for new users (see OpenGeo Suite, for example). But a full commandline like shp2pgsql has too many parameters needed to be effectively called by pgadmin.


2

SELECT cdb_usertables, pg_size_pretty(pg_total_relation_size(cdb_usertables)) FROM CDB_UserTables() ORDER BY pg_total_relation_size(cdb_usertables) DESC The CDB_UserTables() function is mentioned in another question regarding getting a list of all tables. It returns one column named after the function. pg_total_relation_size() "accepts the OID ...


2

I imported a Planet File on a 24Gb Machine (Ubuntu Trusty) with the following .. bzcat planet-latest.osm.bz2 | osm2pgsql --verbose -U YourUser --flat-nodes flat-nodes --keep-coastlines --cache 24000 --hstore --hstore-add-index --tablespace-index pg_default --exclude-invalid-polygon --number-processes 6 --unlogged --cache-strategy dense --extra-attributes ...


2

Your computer should be fine for importing Europe. Given your dataset size and computer, I'd recommend something like this osm2pgsql -c -S /usr/share/osm2pgsql/default.style --slim -d osm-europe --flat-nodes flat-nodes.bin --number-processes 8 -C 20000 europe-latest.osm.pbf I'm assuming that you have an 8 thread CPU, if not, adjust --number-processes. ...


2

I usually do this using QGIS. I load the kml layer, save as shapefile and add the columns that are necessary for rendering. Then I open a connection to my postgis database, delete everything inside the current view, and copy-and-paste the kml data into the postgis layer. I have created a separate bboxdb inside postgis for such cases, so my original osm ...


2

Well, before you convert the database, you could run the Domain to Table geoprocessing tool http://resources.arcgis.com/en/help/main/10.1/index.html#/Domain_To_Table/001700000022000000/ which should convert a domain to a stand-alone table that you could put in the database. Then, you should be able to just convert the database, including stand-alone tables ...


2

You've switched the order of your lat,lon. See the documentation for ST_MakePoint() and you'll see that it requires: ST_SetSRID(ST_MakePoint(lon, lat),4326) Then, after to make your changes, try verifying: SELECT ST_AsText(location) FROM *tablename* LIMIT 10;


2

JJD yes there is. I haven't used it myself. You use the -m option and pass a mapping file that has the old column name and new column name on each line. As Ryan alluded to here: http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg I suspect he was thinking of -m and mistyped -f. Hope that helps, Regina


1

myVectorLayer = QgsVectorLayer("polygon", "mypoly", 'ogr') does not create a valid vector layer, therefore mySymbol1 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType()) does not return a valid symbol and causes the error you see. Replace "polygon" with a valid file path.


1

You can't. Table inheritance is a bit limited. In particular, you can't have a foreign key that references all parts of an inherited table set, and you can't define triggers or constraints that're inherited by a set of tables.


1

What do you mean by no spatial view. You mean you are not seeing it in geometry_columns table or your viewer is not loading it? If you are using PostGIS 1.5 or lower, you have to manually add the view to the table geometry_columns table. In PostGIS 2.0+, it will show in list but won't show type. To get type you need to do cast it. Also many views like ...


1

If you're a very beginner you should try this tutorial of osm2po by @Underdark Osm2po will give you ready to use graph from osm data as sql script file, all you have to do is load it into database via psql -f command. In this table every single record is edge. Every edge has 2 vertices source and target - coordinations of this points are in column x1,y2 ...


1

You should check the pgRouting project. There is a great step to step workshop/tutorial. http://workshop.pgrouting.org/


1

I'd go with the Geometry Accessors Width: ST_XMax - ST_XMin, and the related functions for Y to give height.


1

please see official documentation. they are great! see in this post when to use what and why. generally it is a matter of complexity. some tasks requires less gun power and some need more.


1

I was able to import a full planet file in about 5 days using osm2pgsql with almost the same machine specs you have. You could do that, then use the PGRouting Calculate Topology functions (plus the other info on that page) to build your network. This has the added advantage of giving you a PostGis database with all the tags as well to use for queries or ...


1

I think the trouble is that function pgr_drivingdistance is returning: set of pgr_costResult[]: seq: row sequence id1: node ID id2: edge ID cost: cost to get to this node ID You don't have any geometry here... You have to join this result again with os_vd_2014_road table to reach geometry and then st_collect it and st_concavehull


1

This worked for me. Change the line in the Dockerfile that has the install to use 2.0 postgis: RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis-2.0


1

As this message show: UnicodeDecodeError: 'utf8' codec can't decode byte 0xc4 in position 0: invalid continuation byte It is likely due a problem with character encodings. Maybe your database is using ASCII instead of UTF8. To check what character encoding is using your database, you cold ask your postgreSQL server with PGAdmin III or psql. If you have ...



Only top voted, non community-wiki answers of a minimum length are eligible