Tag Info

New answers tagged

1

In general, there is more support for the geometry than the geography data type, see function comparison matrix. For your type of query, classic point in polygon, I think you can use the geometry datatype, setting the spatial reference ID (SRID) to 4326 (lat/lon). See, this thread on the difference between geography and geometry for more info. The gist ...


0

Bit late to the party, but I'll answer anyway 1. Connect to GeoServer cat = Catalog('http://localhost:8080/geoserver/rest') 2. Create a Workspace ws = cat.create_workspace('newWorkspaceName','newWorkspaceUri') 3. Create PostGIS store ds = cat.create_datastore(newDatastoreName,newWorkspaceName) ds.connection_parameters.update(host='localhost', ...


1

This is at least one version of the SQL too: SELECT MIN(ST_UpperLeftX(rast)) AS min_x, MAX(ST_UpperLeftX(rast) + (ST_Width(rast) * ST_PixelWidth(rast))) AS max_x, MIN(ST_UpperLeftY(rast) - (ST_Height(rast) * ST_PixelHeight(rast))) AS min_y, MAX(ST_UpperLeftY(rast)) AS max_y, (MAX(ST_UpperLeftX(rast) + (ST_Width(rast) * ST_PixelWidth(rast))) - ...


2

When I looked at your question I thought you might have a conflict between postgresql versions and postgis versions. That made me reach for the Postgresql to PostGIS supported versions matrix. But that is not the problem. The problem is with your apt-get line apt-get install postgresql postgis postgresql-contrib postgresql-9.1-postgis ...


0

I don't know why SPIT is not working for you and it may be a version thing (either with QGIS or PostGIS). It could also be that you don't have the correct access permissions on your account on PostGIS and you need to take that up with your database administrator (I'm assuming the PostGIS instance is remote too). However, what you could do as a work around ...


1

Self-intersections are not as malicious as non-noded cross intersections. Here is some solutions 4 U: Automagical fixes by ST_MakeValid: update mytable set way = ST_Makevalid(way) where st_isvalid(way)=false And similar, but using st_buffer: update mytable set way = ST_Buffer(way,0) where st_isvalid(way)=false If it wont help this will give you ...


0

You can use ORDER BY, and LIMIT your result to 1 to find the closest road: SELECT gid, ST_Distance(ST_Transform(ST_GeomFromText('POINT(39.240443 26.208803)',3857),4326),geom) AS myLineDistance FROM road ORDER BY ST_Distance(ST_Transform(ST_GeomFromText('POINT(39.240443 26.208803)',3857),4326),geom) LIMIT 1 For the second query, you can convert the ...



Top 50 recent answers are included