#Mac OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Abordagem tradicional (vetor/vetor): | |
| SELECT foo.value, ST_area(foo.geom::geography)/10000 AS area_ha | |
| FROM ( SELECT c.value, | |
| ST_Union(ST_Intersection(f.geom, c.geom)) as geom | |
| FROM fazendas f, capacidade_vect c | |
| WHERE ST_Intersects(f.geom, c.geom) | |
| AND f.gid = 6 | |
| GROUP BY c.value | |
| ) as foo | |
| ORDER BY foo.value; |
#Mac OS X
As configured in my dotfiles.
start new:
tmux
start new with session name:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * PostGIS to GeoJSON | |
| * Query a PostGIS table or view and return the results in GeoJSON format, suitable for use in OpenLayers, Leaflet, etc. | |
| * | |
| * @param string $geotable The PostGIS layer name *REQUIRED* | |
| * @param string $geomfield The PostGIS geometry field *REQUIRED* | |
| * @param string $srid The SRID of the returned GeoJSON *OPTIONAL (If omitted, EPSG: 4326 will be used)* | |
| * @param string $fields Fields to be returned *OPTIONAL (If omitted, all fields will be returned)* NOTE- Uppercase field names should be wrapped in double quotes | |
| * @param string $parameters SQL WHERE clause parameters *OPTIONAL* |
NewerOlder