Advertisement
Guest User

Untitled

a guest
Apr 14th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. --- List all of table a that intersects table b
  2. select p.gid, p.name,c.district from public.working_poi as p join public.districts as c /
  3. on st_intersects(p.geom, c.geom) order by p.name;
  4.  
  5. --- Update Geometry
  6. SELECT UpdateGeometrySRID('roads','geom',4326);
  7.  
  8. --- Import SHP file with OGR and target projection
  9. ogr2ogr -f "PostgreSQL" -t_srs EPSG:3435 -sql "SELECT DistrictName from Districts" /
  10. PG:"dbname='mytable' user='username' password='userpassword'" -nln DistrictTableName /
  11. -lco SCHEMA=public -lco OVERWRITE=YES -lco GEOMETRY_NAME=geom Districts.shp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement