Tag Info

Hot answers tagged

4

You can simplify the whole thing by using coalesce, which selects the first non-null item in a list, in this case, either the nearest point to you search point, (28.959495,41.019913), or the point itself. with input_geom (geom) as (select st_setsrid(st_makepoint(28.959495,41.019913), 4326)) select coalesce( (select st_closestpoint(pts.the_geom, ...


3

I think you want to exclude the intersection of the buffer in the where clause. WITH subq AS ( SELECT p.id, p.name, unnest(ARRAY(SELECT q.name FROM w_point q WHERE p.id != q.id AND NOT ST_Intersects(q.geom, ST_Buffer(p.geom, 0.1)) ORDER BY ST_Buffer(p.geom, 0.1) <#> q.geom LIMIT 5) ) as name FROM w_point p ) SELECT ...


2

Besides the view, the only other possibility that comes to mind is to teach GeoServer to recognize these fields by improving its code. You can ask on the geotools-devel/geoserver-devel mailing list for directions, if you plan to do it yourself, or check the commercial support links at geotools.org and geoserver.org


2

The shapefile you provided seems to be valid, and the projection in the prj files states (if im not mistaken) that your coordinates of each vertex are tied to WGS84 (EPSG:4326) Using ogr2ogr PGDump driver you can translate your shapefile to a sql querry that can be used to insert data into the database: If you are in Windows you can open the console with ...


1

This: 'POINT(?, ?)' is within a literal string, so placeholders are not interpreted. You must instead keep the placeholders outside a literal and use concatenation or function call syntax. In this case there's actually a point(x,y) function, so you can just write: POINT(?,?) without the single quotes, but if that weren't the case and you needed to ...


1

Are you calling pgr_drivingdistance and then using id2 (the "edge id") to join back to your edge table? If so, the pgr_drivingdistance function actually currently has a bug which causes this 'edge id' to not represent the actual path taken to get to that node. see https://github.com/pgRouting/pgrouting/issues/203 There's currently an open pull request to ...



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