source: subversion/applications/utils/export/osm2pgsql/reprojection.h @ 21054

Last change on this file since 21054 was 18439, checked in by frederik, 10 years ago

Allow creation of expiry lists for 900913 tiles even if your target
projection is not 900913 (e.g. you have your PostGIS table in lat/lon).

Also fixes another bug in the old projection code where expire_from_bbox
would not expire the whole box properly (expire-tiles.c around line 333,
should have used min/max lon/lat but used min lon/lat twice).

File size: 654 bytes
Line 
1/* reprojection.h
2 *
3 * Convert OSM lattitude / longitude from degrees to mercator
4 * so that Mapnik does not have to project the data again
5 *
6 */
7
8#ifndef REPROJECTION_H
9#define REPROJECTION_H
10
11struct Projection_Info {
12  char *descr;
13  char *proj4text;
14  int srs;
15  char *option;
16};
17
18enum Projection { PROJ_LATLONG = 0, PROJ_MERC, PROJ_SPHERE_MERC,   PROJ_COUNT };
19void project_init(int);
20void project_exit(void);
21struct Projection_Info const* project_getprojinfo(void);
22void reproject(double *lat, double *lon);
23void coords_to_tile(double *tilex, double *tiley, double lon, double lat);
24
25extern const struct Projection_Info Projection_Info[];
26
27#endif
Note: See TracBrowser for help on using the repository browser.