-
Notifications
You must be signed in to change notification settings - Fork 10
Implement some GDAL functions #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
add header gdal.h check php version add message if failure
add get_ogr_error_string() fix null pointer exceptions fix optional epsg default parameter issue fix OGRSpatialReference definition
…s...) remove gdal_free (useless as gdal_free_Dataset now do the job) fix rasterSRS value
- properties into specific array - add epsg code raster properties - add all (not just first) 'raster' file(s) with value into specific array - comment projectionRef
…ocationinfo: - add gdal_tr_create (return CoordinateTransformation resource) & gdal_ds_getsrscode (get dataset SRS code) - gdalopen: add optional passed by reference trgSRS parameter to retrieve dataset SRS code at Dataset creation - gdal_locationinfo: change int epsg additional parameter from to zhct CoordinateTransformation fix: - OSRGetAuthorityCode: COMPD_CS > NULL (first in root) - avoid useless resource creation: OSRNewSpatialReference(GDALGetProjectionRef(GDALDatasetH)) > GDALGetSpatialRef(GDALDatasetH) - add RETURN_NULL() after zend_throw_exception add correct proto to gdal* functions
|
First of all: Many thanks for this - looks like some really good work and a first step to getting at least a little bit of the GDAL raster handling in to PHP so I'd be very interested in accepting this PR. I haven't actually tested anything yet, so the following comments are based purely on a brief code review and are intended as discussion points - I appreciate that you probably did this to solve a specific problem and may or may not have some capacity to generalise things.
For any functions such as |
Implement some GDAL functions:
gdalregisterallgdalopengdal_locationinfogdal_ds_getsrscodegdal_tr_createsummary of changes
config.w32gdal.hphp_ogr_api.hphp_ogr.hPHP_OGR_VERSION1.6.1 > 1.7.0PHP_OGR_EXTNAME(used inogr_module_entry)ogr.cgdal_free_Dataset()destructorogr_free_DatasourceCPLSetErrorHandler) beforeREGISTER_INI_ENTRIESPHP_MSHUTDOWN_FUNCTION: callGDALDumpOpenDatasets&GDALDestroyDriverManager(:warning: need to be verified…)PHP_MINFO_FUNCTION: add GDAL Build Infoget_ogr_error_stringTo be done
gdal.hinconfig.m4And don't hesitate to give me some feedback / criticism as I'm quite rusty in C, I would enjoy to improve it!