43 | | You should use *PascalCase* for namespaces, and separate logical components with periods, and avoid using the same name for a namespace and a class. |
| 43 | We should use PascalCase for namespaces, and separate logical components with periods, and avoid using the same name for a namespace and a class. |
| 44 | |
| 45 | As far as we can we use PascalCase for the acronyms and UpperCase for the abbreviations. |
| 46 | |
| 47 | The following GDAL/OGR namespace names were used: |
| 48 | |
| 49 | * OSGeo.GDAL |
| 50 | * OSGeo.OGR |
| 51 | * OSGeo.OSR |
| 52 | |
| 53 | The programmer should import these OSGeo prefixed namespaces instead of the old ones like: |
| 54 | |
| 55 | {{{ |
| 56 | import OSGeo.OGR |
| 57 | }}} |
| 58 | |
| 59 | instead of |
| 60 | |
| 61 | {{{ |
| 62 | import OGR |
| 63 | }}} |
| 64 | |
| 65 | The following module names were used: |
| 66 | |
| 67 | * Gdal |
| 68 | * Ogr |
| 69 | * Osr |
| 70 | * GdalConst |
| 71 | |
| 72 | These module classes contain the static functions related to a particular project so the invocation of these function is changed accordingly. For example we should use : |
| 73 | |
| 74 | {{{ |
| 75 | Driver drv = Ogr.GetDriverByName("ESRI Shapefile"); |
| 76 | }}} |
| 77 | |
| 78 | instead of: |
| 79 | |
| 80 | {{{ |
| 81 | Driver drv = ogr.GetDriverByName("ESRI Shapefile"); |
| 82 | }}} |