Tag Info

Hot answers tagged

4

Your data looks like it's Mercator (big negative X's). I'll assume web mercator, but that could be wrong, and may lead to meter-level inaccuracies (if it's "real" mercator, use 3395). shp2pgsql -c -d -D -W LATIN1 -s 3857 -I 'path/to/shapefile.shp' my_table | psql -d mydb Now flip the coordinates to geographics inside the database ALTER TABLE my_table ...


3

The function returns a table with typed columns (a schema) and rows (values). The .* at the end means "all columns from the table." SELECT * FROM f(x) would give a similar output to SELECT (f(x)).*. Due to a PostgreSQL quirk functions with multiple columns may be called once for each column by the query planner in the cases above. So it is advised to use a ...


2

This is more of a PostgreSQL question rather than a PostGIS question, but sill a good one. Functions like ST_PixelAsPoints, ST_PixelAsPolygons, and ST_PixelAsCentroids return a set of composite record data type, which have several fields. This is very similar to ST_Dump, described here. To gain access to all the returned fields from these composite data ...


2

It looks like you're trying to get a unique integer field for QGIS to use as a key. I've had luck using the row_number window function for this. The basic syntax is: SELECT row_number() OVER () As vid, ... That will give each row a sequential integer starting with 1.


1

All four of the databases you listed have the capability to support the type of query you're asking about. SQLite and Postgres through extensions (Spatialite & PostGIS respectively), mySQL and MariaDB have some basic GIS support built in natively. As to which to use, it depends on your needs. Personally I go with SQLite for simple in house ...


1

From What I have found I think we can simply parse the xsd and find the column names.Since the column names are in any case going to be in string format.We only need to store that as varchar in the postgres table.


1

This is your issue: var flightPlanCoordinates = [ new google.maps.LatLng('<?php echo implode("','", $roads); ?>') ]; It does not create an array of LatLng. It creates an Array with one Invalid LatLng with in since it's expecting a latitude and a longitude and your giving it many latitudes and longitudes? If you have more ...



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