Hot answers tagged

4

I like to use the json_build_object function. SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM ( SELECT 'Feature' As type , ST_AsGeoJSON(lg.geometry)::json As geometry , json_build_object( 'attribute1', attribute1, 'attribute2', ...


3

You seem to have a PostGIS installation that was created by loading the postgis.sql file, rather than using the CREATE EXTENSION postgis command. So when you dumped your database, you got not only the data, but also all the function definitions, which includes references to the 2.1 PostGIS library. Install PostGIS 2.1.8 on your new system. Create a blank ...


1

The function used in UpdateGeometrySRID is st_setsrid instead of st_transform. st_setsrid just sets the srid value without changing the coordinates. Since there is no function for looping tables to transform projection in PostGIS according to updateGeometrySRID function. I suggest you to write a script in python to execute it: Firstly execute to get the ...


1

There are several alternatives using CARTO to solve the points-overlapping problem. First, if you have a timestamp column and the deaths have happened in two different dates, you can use Torque. That is an animated map. Second, the Wizard of the old Editor allow you to aggregate points in clusters, intensity or density maps. But my favorite example is using ...


1

Your syntax is wrong. But in the documentation is exactly the example given you need. Just took an example for streetname from the first basic example in the documentation an put it together to an insert statement. Did not test it. It is also important how your table is structured and that you have the appropriate columns as it is needed for the correct ...



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