Tag Info

Hot answers tagged

5

ST_3DIntersection is available only via the SFCGAL extension. Unfortunately only windows (PostGIS 2.2 experimental) and Ubuntu (via docker ) have it at the moment, so most likely you'd have to compile PostGIS yourself to use it. It would be useful to know the OS you are on. PostGIS windows 2.2 experimental binaries have SFCGAL and can be downloaded here: ...


4

I suspect we don't support it, however you could try with the -m switch where what follows the -m is the filename consisting of old name and new name. It might not work though since gid is an autogenerated field name. If it doesn't feel free to put in a ticket in our ticket tracker http://trac.osgeo.org/postgis/newticket . i think it's a fairly easy ...


3

According to the documentation (chapter 7.3), there are several geometry accessors which might meet your criteria, depending on whether the geometry is a collection, a polygon, or a multi-polygon: ST_NumGeometries - If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, otherwise return NULL. ST_NumInteriorRings - Return the ...


3

Use the geometry accessor ST_NumGeometries. For example SELECT ID, ST_NumGeometries(shape) FROM myTable If your geometries contain geometry types other than polygons, you will need to break them up and keep only the polygons before counting. But from your question this would not be required.


3

Put your first query in the from clause of the 2nd: something like that should work: SELECT building.id building.address FROM building, (SELECT event_point.id, event_point.geom, st_buffer(event_point.geom, 100) AS buffergeom FROM public.event_point) buffer WHERE ST_within(building.geom, buffer.buffergeom)


3

You should probably look to a database as soon as your mosaic is non-trivial. As user30184 pointed out, there are examples of that. However Image Mosaic has different levels of capability in different versions of GeoServer. The documentation page you linked to appears a bit outdated on the supported indexes (even on the 2.6 version of that page), but there ...


3

I believe the general outline (partly tested so far) is: Find the points representing stream sources, as in this answer. Intersect with the polygons table to get a count of source vertices by polygon. Use ST_DumpPoints in conjunction with group by geometry to get a count of each point. The idea being to get a count of how many rivers meet at a given point. ...


2

If I understand your question correctly, I think @gcarillo has the right idea in his comment. Rather than building the linestrings before the intersection, determine the points inside the polygon first and then build the linestrings based on sequence groups. Although it looks a little complex, the following query will achieve this. I've made some ...


2

You need to use ST_Transform. For example, taking a point somewhere in Southern India (which I'm guessing from the UTM zone and your profile is the area you are interesting in) SELECT ST_X(geom), ST_Y(geom) FROM (SELECT ST_Transform(ST_SetSrid(ST_MakePoint(627516, 1413990), 32643), 4326) as geom) g; or in your case, if you have a table already with ...


2

=== Work on My Mac === I hope this can solve your problem to. The problem because Qgis Connect with TCP / IP protocol, refer to this link : http://hub.qgis.org/issues/735 QGIS uses tcp/ip connections to PostgreSQL, regardless of whether both client and server are on the same host. You can configure PostgreSQL to accept such connections as trusted, however ...


2

Ciao DrStereo, short answer: ImageMosaic supports footprints as Shapefile or wkb files More info here longer answer: ImageMosaic code can be easily extended to support footprints in raster form or other vector sources. We are planning raster support shortly, other vector sources are unplanned at the moment. Probably not what you wanted to hear, ...


2

Here's one approach to designing your database tables: Wherever you have shapes that have exactly the same combination of geometry type and set of attributes, put them in one single table. Probably, this will be based on those themes you mention. If that still appears to be too many tables, maybe think about combining those themes that are very similar (re. ...


1

Desktop is a 32bit application, thus 32bit client libs are required when connecting to the database. ArcGIS Server is 64bit. The 64bit client libs need to be installed for the service to work. The particular help link for Postgres client libs can be found here


1

From the ArcSDE Administration Command Reference: Beginning with ArcGIS 10.1, you must use a geoprocessing tool or Python script to create a geodatabase. For geodatabases in Oracle, SQL Server, and PostgreSQL, if you can use the default settings, use the Create Enterprise Geodatabase tool or a Python script that calls this tool. If you want to ...


1

If you want to insert into three tables, added, deleted, unchanged, then there is no need to return anything from the trigger, just do this work inside the trigger. CREATE or REPLACE FUNCTION cd_3() RETURNS trigger as $$ BEGIN INSERT INTO added (geom) SELECT ST_Difference(new.geom, geom) FROM public.landkreise_projected_added ...


1

Have you tried using the newer pg_dump command line tools on your PostgreSQL 8.3 (you can run it from the 64-bit server and have it back up the 32-bit). It's been a while since I've done that, but that often works better than using the older tool.


1

You could write a pl/pgsql-function in which you create a temp table(which you can drop on commit).then loop through the records of your (executed) sql-statement and write one result during each loop in this table.if all loops are done execute a "select * from temptable" and set the result of this query as return value.


1

Replace the geom for the_geom (note the underscore). If the column really includes a space then you must reference it with double quotes: "the geom". This later case is not such a good idea, I would advise you to rename the table column to the_geom.


1

Answering my own question here in the hope that this helps others (or my future self). In the intervening weeks since I posted the question, I was unable to find an elegant solution to this problem that could be done algorithmically in PostgreSQL. Instead, I broke the task down into constituent parts and more or less brute-forced it. For the purposes of ...


1

I've had good luck using the 6-color algorithm described in the introduction to Two Linear-Time Algorithms for Five-Coloring a Planar Graph. Although it's certainly possible to color a graph using fewer colors, it may not look any better than using 5 or 6. ALGORITHM 6-COLOR. Given an n-vertex planar graph G in adjacency list form, this algorithm ...


1

You should be able to extract the versions from the postgis_full version SQL command. See http://www.postgis.net/docs/manual-dev/PostGIS_Full_Version.html for an example.


1

Perhaps you installed the SFCGAL extension in your PostGIS 2.1 db instead of a PostGIS 2.2 db. If so, you need to upgrade your PostGIS to PostGIS 2.2 with the alter extension. ALTER EXTENSION postgis UPDATE TO "2.2.0dev"; The issue I suspect you are running into is because you have two versions of PostGIS -- SFGCAL loads up the postgis-2.2.dll and your ...


1

So, it was because I hadn't specified that points should be stored in latitude and longitude when running osm2pgsql. The command I used successfully was osm2pgsql -c -l -s -d england_osm ~/Downloads/england-latest.osm.pbf


1

The query looks good but if you want all ways which are partly in a bounding box you have to use the st_intersects function. If you want to show the error of your defined bounding box and you don't have any software you can put you bounding box in an ST_AsGeoJson function to get an geojson string as result. The easiest way to check your geometry is to ...



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