Tag Info

New answers tagged

0

It can't be installed from repositories, you may need to download and install from source. Try this: Install GEOS(for topology support) wget http://download.osgeo.org/geos/geos-3.3.9.tar.bz2 tar xfj geos-3.3.9.tar.bz2 cd geos-3.3.9 ./configure make sudo make install cd.. Install PostGIS 2.0 wget ...


1

I use this when aggregating the shapes from the GADM2 dataset in SQL Server: SET @g2 = @g1.STBuffer(1).Reduce(1).STBuffer(-1).Reduce(1) the reduce() clears out the extended artefacts and speeds things up by a factor of 100x - a bit rough, but good for approximations.


0

I don't think OpenGeo ships with pgRouting so I'm guessing you copied the pgRouting files from http://postgis.net/windows_downloads? The question is which ones did you copy. As someone else noted you say you have 9.3 but yet you are copying into a 9.2 folder. Those definitely are incompatible. You need to use 9.3 binaries with 9.3 install and 9.2 with ...


1

Hey first you should try to dump your database using pg_dump (http://www.postgresql.org/docs/9.3/static/app-pgdump.html) before you do anything else. This at least should give you a copy of the current non working data, which you can revert back to. Also make a copy of your data dir ...


1

For those who will stumble on this question like me.. It appears that the plugin has been generated (https://github.com/strk/mapnik/tree/2.3.x-pgraster) and has been merged in official Mapnik Repo. The branch is 2.3.x (https://github.com/mapnik/mapnik/tree/2.3.x) Now you can build Mapnik from the branch and use PGRaster plugin to use Raster data from ...


0

I look at this question as a workflow question. I've been working on a problem. It is easy to just use the qgis database manager and plug a query in to generate some spatial data. The problem is that I was working with an unsaved test project and all my stored queries in the project disappeared when I managed to lock up qgis. So what if I store the query ...


2

Looks like there is an error in the geography(bytea) function that is bound to the bytea to geography cast. You can patch it temporarily like this: CREATE OR REPLACE FUNCTION geography(bytea) RETURNS geography AS '$libdir/postgis-2.1','geography_from_binary' LANGUAGE 'c' IMMUTABLE STRICT; Should be fixed in upcoming releases.


0

Extending what LaposhasĂș Acsa has said, you can always use a subquery and only create a polygon from those polygons in subquery that have 4 or more points, ie, SELECT st_makepolygon(g.geom) FROM (SELECT st_addpoint(st_makeline(geom ORDER BY cd_noseq), st_pointn(st_makeline(geom ORDER BY cd_noseq), 1))) as geom) g WHERE ...


1

You first mistake is trying to call it via pgAdmin command line. Just call it from dos screen. What you could do is create a batch file like load_data.bat Then put lines like folliowing in there and then run the bat file SET PATH="%PATH%;c:\Program files\PostgresSQL\9.3\bin" SET PGPORT=5432 SET PGHOST=localhost SET PGUSER=postgres SET ...


2

Your query looks good. According to the source the error message means exactly what it says. One of your linestrings doesn't have at least 4 points. Check your results with ST_NumPoints!


0

As @BradHards suggested I'm posting my solution: I installed PostGis, Imported the data, and executed the following query: create merged as delomrade_code, st_union(geometry) from grunnkrets group by delomrade_code results were much better with my data. first it executed in minutes. and the result set has only 6 MULTIPOLYGONS out of 1546 as oppose to ...


0

If you converted the data to KML, and didn't change the coordinate reference system when you went from KML to SHP, then the units are almost certainly in degrees. Let me say that again - your distance measure is now degrees. It is not metres, miles or kilometres. Degrees probably isn't what you wanted for a buffer. So you may want to project (using the ...


1

You mention PostGIS. If you want to use PostGIS, with the spatial functions and spatial index that comes with PostGIS you will have to use the PostGIS geometry or geographic data type. If you stor latitude and longitude in separate columns you will have to reinvent the wheel to do any spatial calculations. And a 2d point consists of longitude and latitude ...



Top 50 recent answers are included