Tag Info

New answers tagged

3

I don't think it is possible to run postgres without setting up the service and the postgres user. The client has to know what port the database is listening to etc. What you can do is setting up the database identically on two computers, and exchange the data directories if needed.


1

EPSG:277000 = OSGB 1936 / British National Grid proj4 is +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs. So You have points in degrees in metric systems and you use meters to find distance between users ? First use ST_SetSRID(...., 43236) (that would be WGS84 and it uses degrees ) ...


1

try to use metric transformation: SELECT * FROM location_test WHERE ST_DWithin(geom, ST_Transform(ST_GeomFromText( 'POINT( 48.9 2.4 )',27700), 900913) , 100.0); i hope it helps you...


2

You may try this: CREATE VIEW user_1_road AS SELECT f.pk_id, f.geom, f.name, f.type, f.importance, f.notes, f.label_x, f.label_y, f.label_angle FROM road AS f JOIN (SELECT geom FROM regions where user_id = '1') AS g ON st_contains(g.geom, f.geom); I tested with my data and it went from 1847 miliseconds to 245 miliseconds.


0

Ok, I obtained the speed settings per road class by a linear optimization. Obtain the path length for which the travel time was measured. This can be done by pgrouting and QGIS. First route the shortest path or manually draw it, then export the path with its road classes to excel. Within Excel use a Pivot table to extract the sum per road type and route. ...


0

If you want to exclude the polygons, which only touch the river, maybe it helps, if you write: WHERE ... AND ST_Intersects(toky.geom, pov.geom) AND NOT St_touches(toky.geom, pov.geom) or use ST_Relate instead of ST_Intersects


1

Well check for the "kind of intersection". Translating your predicate below to human language: WHERE toky.gid = $gid // river id AND $table.uid = $id // county id AND ST_Intersects($table.geom, pov.geom) AND ST_Intersects(toky.geom, pov.geom) Want data where the river toki has the identifier - ...


0

You use the port 5433, but the standard port is 5432. Maybe control it.


1

I don't know if this will help but.... I have only just started on this but I found that "localhost" would not resolve on my PC which has similar config/versions to yours. I replaced it with 127.0.0.1 and I got a successful connection.


2

You have to use ST_DUMP first to split the multilines into seperate lines, buffer those and then collect them into a multi again: UPDATE rivers SET poly = p.npoly FROM ( SELECT ST_MULTI(ST_COLLECT(ST_BUFFER((q.dump).geom,1) ORDER BY (q.dump).path)) as npoly FROM ( SELECT ST_DUMP(lines) AS dump from rivers where id = 1 ) as ...


0

The command should have been: $host = '10.50.110.11'; $port = '5432'; $database = 'template_postgis_20'; $user = 'postgres'; $password = 'user'; You also need to set your server to listen to connections from interfaces. To do this, change the listen_addresses in your postgresql.conf file from 127.0.0.1 to *. You might also want to check your ...


1

I've managed to solve this, without using the mentioned GRASS tools or topological functions. Basically I take all start- and endnodes, put them in a new, temporary table, put a buffer around them, union the buffer objects, and move all found nodes in each buffer to the centroid of the buffer. When that's done I move the original begin and end points to ...


1

Here are three options. Hopefully one will help. v.clean Using the GRASS tools in QGIS you can clean up the topology of a spatial object. User @R.K. gives a good set of instructions on how to do this in an answer to a different question. The advantage that GRASS gives is that it will infer the shapefile's topology. The disadvantage for your situation is ...


1

PostGIS has snapping functions.. maybe they will help? ST_Snap: Snap segments and vertices of input geometry to vertices of a reference geometry. ST_SnapToGrid: Snap all points of the input geometry to a regular grid.


0

In a generic sense, use the affine transform parameters, which should be available with any raster file format. With GDAL, this is available with GetGeoTransform(), or PostGIS' ST_GeoReference() function. After finding these six parameters, one only needs to determine which ones they are, then a function can be made to transform in linear space. E.g., with ...


1

The most obvious approach I can see for this problem is to first determine the legal speed limits for all roads in the area of interest. Then using the travel time measurements, see how much longer than the theoretical minimum travel time the actual times are. Could be as simple as a factor which is applied to reduce the max speed. The factor could be ...


2

The metadata are available on the web site. Clicking on any of the choices gives an extensive metadata listing in a standardized (extremely verbose) format. For instance, from the metadata for Alabama 2012 I find (in the "spatial reference section" near the end) the following: FOR CROPSCAPE USERS: Albers Conical Equal Area is the native projection used in ...


2

When you import using the java -jar ... command you can add parameters to control how much memory will be given to the JVM running that program. Try the following: java -jar -Xms512m -Xmx512m ... If that doesn't work, increase both numbers to 1024 or 2048.


0

Found the answer...gt-imagemosaic-jdbc-9.1 plugin (from Geotools) probably doesn't support PostGIS 2.0: geomfromwkb function is not defined - in newer versions it is st_geomfromwkb. Right now i'm using an older postgis/postgres database.


0

Say you have my_table with a geom column with a typmod geometry(Polygon,4326): CREATE table my_table( gid serial primary key, geom geometry(Polygon,4326) ); To store whatever geometry type you want, just redefine the typmod to geometry(Geometry,4326), or don't use typmods. (The former enforces the SRID, and the later doesn't enforce anything): ALTER ...


0

As you suspect, this is from invalid geometries. First, find them and identify the issue, e.g.: SELECT gid, geom, ST_IsValidReason(geom) FROM my_table WHERE NOT ST_IsValid(geom); Do this for each geometry column/table, and fix the geometries (this might be another question). Use QGIS or some tool to get a visual of the geometry to see what is going on. ...



Top 50 recent answers are included