As configured in my dotfiles.
start new:
tmux
start new with session name:
<?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* |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#Mac OS X
-- 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
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
# Shell script to create a complete Django project. | |
# This script require Python 3.x and pyenv | |
# Settings.py is config to Django 2.2.12 | |
# The project contains: | |
# Settings config | |
# Person model and form | |
# Person list and detail | |
# Person create, update and delete | |
# Admin config |