Giter Site home page Giter Site logo

trigrid's Introduction

trigrid

This little SQL function build a triangular grid like this kind

and result is like this

-- créer une table tirgrid pour l'Irak
drop table if exists iraq_trigrid;create table iraq_trigrid(gid integer,tx integer, ty integer);
SELECT AddGeometryColumn ('','iraq_trigrid','the_geom',4326,'POLYGON',2);
select trigrid (38.6717,28,10,10,0.13,4326,'iraq_trigrid');
CREATE INDEX sidx_trigrid ON iraq_trigrid USING GIST ( the_geom );
CREATE UNIQUE INDEX idx_trigrid_l1 ON iraq_trigrid (gid);
select count(*) from iraq_trigrid;

Produire le grid en degrés.
A Argus : pt_x, pty = coord start grid
gx = largeur grid
gy = hauteur grid
c = longueur des côtés
epsg = code epsg des unités de mesures
tbl = nom de table de sortie
approx 200 m = 0.002 degr
1 km = 0.013 degr

E Exemple: select trigrid (-150,36,100,44,0.13,4326,'trigrid_l1');
O Output : A triangle geometry. Blog post : http://simonmercier.net/blog/?p=1245

trigrid's People

Contributors

reachlbn avatar smercier avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.