gprojects.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef GRASS_GPROJECTSDEFS_H
  2. #define GRASS_GPROJECTSDEFS_H
  3. /* do_proj.c */
  4. int GPJ_init_transform(const struct pj_info *, const struct pj_info *,
  5. struct pj_info *);
  6. int GPJ_transform(const struct pj_info *, const struct pj_info *,
  7. const struct pj_info *, int, double *, double *, double *);
  8. int GPJ_transform_array(const struct pj_info *, const struct pj_info *,
  9. const struct pj_info *, int,
  10. double *, double *, double *, int);
  11. /* old API, to be removed */
  12. int pj_do_proj(double *, double *, const struct pj_info *, const struct pj_info *);
  13. int pj_do_transform(int, double *, double *, double *,
  14. const struct pj_info *, const struct pj_info *);
  15. /* get_proj.c */
  16. /* TODO: rename pj_ to GPJ_ to avoid symbol clash with PROJ lib */
  17. int pj_get_kv(struct pj_info *, const struct Key_Value *, const struct Key_Value *);
  18. int pj_get_string(struct pj_info *, char *);
  19. #ifndef HAVE_PROJ_H
  20. int GPJ_get_equivalent_latlong(struct pj_info *, struct pj_info *);
  21. #endif
  22. const char *set_proj_share(const char *);
  23. int pj_print_proj_params(const struct pj_info *, const struct pj_info *);
  24. /* convert.c */
  25. char *GPJ_grass_to_wkt(const struct Key_Value *, const struct Key_Value *, int, int);
  26. char *GPJ_grass_to_wkt2(const struct Key_Value *, const struct Key_Value *, const struct Key_Value *, int, int);
  27. #ifdef HAVE_OGR
  28. OGRSpatialReferenceH GPJ_grass_to_osr(const struct Key_Value *, const struct Key_Value *);
  29. OGRSpatialReferenceH GPJ_grass_to_osr2(const struct Key_Value *, const struct Key_Value *, const struct Key_Value *);
  30. const char *GPJ_set_csv_loc(const char *);
  31. int GPJ_osr_to_grass(struct Cell_head *, struct Key_Value **,
  32. struct Key_Value **, OGRSpatialReferenceH, int);
  33. #endif
  34. int GPJ_wkt_to_grass(struct Cell_head *, struct Key_Value **,
  35. struct Key_Value **, const char *, int);
  36. /* datum.c */
  37. int GPJ_get_datum_by_name(const char *, struct gpj_datum *);
  38. int GPJ_get_default_datum_params_by_name(const char *, char **);
  39. int GPJ_get_datum_params(char **, char **);
  40. int GPJ__get_datum_params(const struct Key_Value *, char **, char **);
  41. void GPJ_free_datum(struct gpj_datum *);
  42. struct gpj_datum_transform_list *GPJ_get_datum_transform_by_name(const char *);
  43. void GPJ_free_datum_transform(struct gpj_datum_transform_list *);
  44. /* ellipse.c */
  45. int GPJ_get_ellipsoid_by_name(const char *, struct gpj_ellps *);
  46. int GPJ_get_ellipsoid_params(double *, double *, double *);
  47. int GPJ__get_ellipsoid_params(const struct Key_Value *,
  48. double *, double *, double *);
  49. void GPJ_free_ellps(struct gpj_ellps *);
  50. #ifndef HAVE_PROJ_H
  51. /* PROJ.4's private datastructures copied from projects.h as removed
  52. from upstream; pending better solution. see:
  53. http://trac.osgeo.org/proj/ticket/98 */
  54. int pj_factors(LP, void *, double, struct FACTORS *);
  55. /* end of copy */
  56. #endif
  57. #endif