{ "info": { "author": "Gabriel Desharnais", "author_email": "gabriel.desharnais@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Natural Language :: French", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Atmospheric Science" ], "description": "# TileIndexPythonGenerator\nThis python package will enable you to generate a shapefile TileIndex for MapServer. This TileIndex can be generated for any number of dimension.\n\n## Installation\nInstall via pip `pip install tileIndexPythonGenerator`\n\n### Requirements\n\n- python3\n- gdal/ogr\n- python3 gdal/ogr package\n## API documentation\n### Fuctions\n- `createFromListStruct(fileToCreate, index, doNotOpen=None, fieldsType=[])`: This function use a listStruct to generate a tile index. \n### Constants\n- `__version__`: This constant is the string of the version number of this package.\n## User Manual\n### Creating a TileIndex from listStruct\nTo create a TileIndex you will call the function `tileIndexPythonGenerator.createFromListStruct(fileToCreate,index,doNotOpen=geometry)`.\nWhere:\n\n| Parameter | Type | Default value | Mandatory | Meaning |\n|---------- | ---- | ------------- | --------- | ------- |\n| fileToCreate | str | | Yes | This is the complete path where the tileindex will be created the layer name will be the name of the file. The file must not already exist or else a fileAlreadyExists exception will be thrown. |\n| index | list of dict | Yes | | This is a python list *r.f.* [Index structure](#Index_structure) section. |\n| doNotOpen | list | No | None | This will ask this function to skip the step where it open every file to catch the geometry of the data. doNotOpen is simply a list of point (tuple) **Default value not working, list mandatory** |\n### Creating a TileIndex with an object\nYou can create an tileIndex object that will allow you to add one feature at a time. You can use the function `create` to declare a new tileIndex object.\n`tileIndexPythonGenerator.create(fileToCreate, fields, polygon)`\n| Parameter | Type | Default value | Mandatory | Meaning |\n|---------- | ---- | ------------- | --------- | ------- |\n| fileToCreate | str | | Yes | This is the complete path where the tileindex will be created the layer name will be the name of the file. The file must not already exist or else a fileAlreadyExists exception will be thrown. |\n| fields | list | | Yes | This field must contain a tuple for every field in shapefile. The first element of the tuple is the name of the field, the second one is the len of the string (can't be more than 254). |\n| polygon | list | | Yes | polygon is simply a list of point (tuple) |\n#### Index structure\nFor a no dimension, the python list must be organised this way:\n**Not Yet implemented**\n``` python\n[path0, ... pathN]\n```\nThis will map to a shapefile organised this way:\n\n| LOCATION |\n| -------- |\n| path0 |\n...\n| pathN |\n\nFor multiple dimensions, the python dictionary must be organised this way:\n``` python\n[\"dim_1\",{\n\tlabel1_0:[\n\t\t\"dim_2\",{\n\t\t\t\"label2_0\":\"path0_0\",\n\t\t\t...\n\t\t\t\"label2_N\":\"path0_N\"}\n\t\t],\n\t....\n\t\"label1_M\":[\n\t\t\"dim_2\",{\n\t\t\t\"label2_0\":\"pathM_0\",\n\t\t\t...\n\t\t\t\"label2_N\":\"pathM_N\"}\n\t\t]\n\t}\n]\n```\nThis will map to a shapefile organised this way:\n\n| DIM_1 | DIM_2 | LOCATION |\n| ----- | ----- | -------- |\n| label1_0 | label2_0 | path0_0 |\n| label1_0 | ... | ... |\n| label1_0 | label2_N | path0_N |\n| ... | ... | ... |\n| label1_M | label2_0 | pathM_0 |\n| label1_M | ... | ... |\n| label1_M | label2_M | path0_M |\n\n#### Example\n\n``` python\nindex = [\"dim_1\",{\"label1_0\":[\"dim_2\",{\"label2_0\":\"path0_0\",\"label2_N\":\"path0_N\"}],\"label1_M\":[\"dim_2\",{\"label2_0\":\"pathM_0\",\"label2_N\":\"pathM_N\"}]}]\nfileToCreate = \"index.shp\"\ntipg.createFromListStruct(fileToCreate, index, doNotOpen=[(180,90),(180,-90),(-180,-90),(-180,90)])\n```\n\n#### Fields list structure\n``` python\nimport tileIndexPythonGenerator as tipg\nfields = [(fieldName1, 23), (fieldName2, 230), (\"location\", 254 )]\npolygon = [(180,90),(180,-90),(-180,-90),(-180,90)]\ntIndex = tipg.create(\"fileName.shp\", fields, polygon)\n\ntIndex.add([(fieldName1, value1), (fieldName2, value1)], pathToData)\n# Close the tIndex\ntIndex.close()\n```\n\nTo test the result:\n`ogrinfo -al -geom=yes index.shp`\n## Limitation\nRemember: shapefile can't be more than 4 Gb.\n\nRemenber: shapefile can't have more than 254 char in a string.\n\n## Developer note\nAll variable, functions, etc. are named using **pascal case** (also known as **camel case**). *i.e.* name will always begin by a lower case letter and upper case letter will be used to separate letter.\n\nNo space will be used to do indention in programs **tab** shall be used instead.\n\nSome care will be put in readability of the code but the number one priority is for the code to be as efficient as it can.\n\n## Support\nThere is limited support for these version\n\n| version | name | type | End of support date |\n| -- | -- | -- | -- |\n| 0.0.0.3 | Atlantic Express | DS | 2018-08-01T00:00:00Z |\n| 0.0.0.5 | Adirondack | LTS | 2020-08-01T00:00:00Z |\n| 1.0.0.0 | Acadian | ULTS | 2040-01-01T00:00:00Z |\n\nLTS : Long Term Support\n\nDS : Developer Support\n\nULTS : Ultra long term support\n\nDS support is really short term it should be used in two scenarios\n\n- You need new features not available in the latest LTS\n- You are develloping an application that will be operational only after the next projected LTS puplishement.\n\nDS is minimal it mostly should be considered as beta testing.\n\nLTS is generaly supported for anything from 2 to 5 years. You should use it for your operational project. The pip repo default version will always be a LTS.\n\nULTS is generaly supported for at least 15 years. This version can be downloaded via pip by giving the right version number. ULTS should be used for incredibly stable systems. Systems that requires to be runed for years without any change.\n\nversion numbering is done this way:\n```\n0.0.0.0\n| | | |---Update number changes every time an update is done\n| | |-----DS number\n| |-------LTS number\n|---------ULTS number\n```\nSupport means that no functionnality will be added to the software, but that any bug or vulnerabilities will be patched as long as the devellopers can do it. If you want vendor support (paid support to solve bug or even add new functionnality or improve the software) please contact [gabriel.desharnais@hotmail.com](gabriel.desharnais@hotmail.com).\n\nNames are choosen from:\n[https://en.wikipedia.org/wiki/List_of_named_passenger_trains_of_Canada](https://en.wikipedia.org/wiki/List_of_named_passenger_trains_of_Canada)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Gabriel-Desharnais/TileIndexPythonGenerator", "keywords": "mapserver mapfile tileindex", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tileIndexPythonGenerator", "package_url": "https://pypi.org/project/tileIndexPythonGenerator/", "platform": "", "project_url": "https://pypi.org/project/tileIndexPythonGenerator/", "project_urls": { "Homepage": "https://github.com/Gabriel-Desharnais/TileIndexPythonGenerator" }, "release_url": "https://pypi.org/project/tileIndexPythonGenerator/0.1.0.5/", "requires_dist": null, "requires_python": "", "summary": "Python module to generate a TileIndex", "version": "0.1.0.5" }, "last_serial": 4173925, "releases": { "0.0.0.3": [ { "comment_text": "", "digests": { "md5": "21307bff379a052e61c22419b0eb91c6", "sha256": "1371bc36362074f75376b02d9ff82de34baa184df4b447f4e3e5cdd745f43a7e" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.0.0.3.tar.gz", "has_sig": false, "md5_digest": "21307bff379a052e61c22419b0eb91c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3657, "upload_time": "2018-07-31T19:53:28", "url": "https://files.pythonhosted.org/packages/f5/bc/7d3e0a83ee62595013d2a9009a7d4043268e0e6505ae80d3fcb075da65af/tileIndexPythonGenerator-0.0.0.3.tar.gz" } ], "0.0.0.5": [ { "comment_text": "", "digests": { "md5": "d771ef14631a20ace597169a6be6da88", "sha256": "314ee7eed2d6d68f86f67c015688417ce82d18ffb123e9e7d7b1c22dfd0252ea" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.0.0.5.tar.gz", "has_sig": false, "md5_digest": "d771ef14631a20ace597169a6be6da88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4036, "upload_time": "2018-07-31T20:17:02", "url": "https://files.pythonhosted.org/packages/30/29/4e7a14c8676ebb4bd7eb1b215024c9af49c44f14389d8772b4554dadbdb5/tileIndexPythonGenerator-0.0.0.5.tar.gz" } ], "0.0.0.6": [ { "comment_text": "", "digests": { "md5": "50f54423057d97ad240cc417058f3d90", "sha256": "1558751bc5a8f05b4e7c0d1cb60b49adafdd554ac06ac6bc927a42be9c6c8da3" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.0.0.6.tar.gz", "has_sig": false, "md5_digest": "50f54423057d97ad240cc417058f3d90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4095, "upload_time": "2018-08-07T06:25:40", "url": "https://files.pythonhosted.org/packages/62/0e/e3ba3a95e6052fd0f573fd3b4e060c0ce2e06a307119688e2de10514d047/tileIndexPythonGenerator-0.0.0.6.tar.gz" } ], "0.0.0.7": [ { "comment_text": "", "digests": { "md5": "06870ff92570bddf67a8cafb262b71bb", "sha256": "49d3ebe2cc676cb04f0895ad2aa4602353d06d238310533692b8de8091d424b7" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.0.0.7.tar.gz", "has_sig": false, "md5_digest": "06870ff92570bddf67a8cafb262b71bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4094, "upload_time": "2018-08-07T06:43:29", "url": "https://files.pythonhosted.org/packages/90/21/4919f24e45b34d31f950ce688e5ee440cae92f218481e499d603b7a9c851/tileIndexPythonGenerator-0.0.0.7.tar.gz" } ], "0.0.0.8": [ { "comment_text": "", "digests": { "md5": "391ab12e59b2a830e9f60381c1470822", "sha256": "c20af1a6871cc19050bdfa99760fcec075ca492152ec9064e81157b49523ae23" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.0.0.8.tar.gz", "has_sig": false, "md5_digest": "391ab12e59b2a830e9f60381c1470822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4092, "upload_time": "2018-08-07T06:48:43", "url": "https://files.pythonhosted.org/packages/3d/bc/c13ac0db02fe84fb1b397032858555bc81c5ef8e52e5e8a39e997082b742/tileIndexPythonGenerator-0.0.0.8.tar.gz" } ], "0.1.0.0": [ { "comment_text": "", "digests": { "md5": "505636aa4aa63067b0b909604768b89c", "sha256": "3eb436a11e5755b4dad45c586da096d204779f680f25ad2922420e459cb8976f" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.0.tar.gz", "has_sig": false, "md5_digest": "505636aa4aa63067b0b909604768b89c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5209, "upload_time": "2018-08-13T13:50:26", "url": "https://files.pythonhosted.org/packages/c6/9c/f530d7305b3d85bb61747d12abe8517344cf3d6baaf5bd64c9da34f70bb6/tileIndexPythonGenerator-0.1.0.0.tar.gz" } ], "0.1.0.1": [ { "comment_text": "", "digests": { "md5": "b71594059728e83112ab96be0e41e03e", "sha256": "f12068fc2aed76357193c0e1da5ca5a688f28a3b90e83cf7cb24c650d8ae00c4" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.1.tar.gz", "has_sig": false, "md5_digest": "b71594059728e83112ab96be0e41e03e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5889, "upload_time": "2018-08-13T21:28:32", "url": "https://files.pythonhosted.org/packages/c3/67/74ea4a2d47f5b920c2fd48a729b22cc21346a0a1551958b073391c2eec02/tileIndexPythonGenerator-0.1.0.1.tar.gz" } ], "0.1.0.2": [ { "comment_text": "", "digests": { "md5": "18d213e056146df7c81546c28d5dbc2c", "sha256": "5a054a4c21869184d90b2c7d842b176f80872ada050542c79fee39159850fe0a" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.2.tar.gz", "has_sig": false, "md5_digest": "18d213e056146df7c81546c28d5dbc2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5913, "upload_time": "2018-08-13T21:33:06", "url": "https://files.pythonhosted.org/packages/0d/24/c7dc576658d282c8ee80b1bfb8a956fb45af414230b345eebf6135224828/tileIndexPythonGenerator-0.1.0.2.tar.gz" } ], "0.1.0.3": [ { "comment_text": "", "digests": { "md5": "782f0668046e44cb98595f9aff950442", "sha256": "c9f71ebd05fb20a831e7a15c5e75d9d2106a2c4635aff59bc77a56f269152358" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.3.tar.gz", "has_sig": false, "md5_digest": "782f0668046e44cb98595f9aff950442", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5996, "upload_time": "2018-08-14T19:01:52", "url": "https://files.pythonhosted.org/packages/51/e6/5e73f93063845ecaf7ef493ed8c16d65e49d430508b3d236300df892edd8/tileIndexPythonGenerator-0.1.0.3.tar.gz" } ], "0.1.0.4": [ { "comment_text": "", "digests": { "md5": "b3d28f8ec5c8954cfad2137fc5e72f87", "sha256": "6f3caacccc0555ed9ece7effeada3ec423ddfaf4ffc8c3684108c5f91bc6f7cf" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.4.tar.gz", "has_sig": false, "md5_digest": "b3d28f8ec5c8954cfad2137fc5e72f87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6038, "upload_time": "2018-08-14T20:19:20", "url": "https://files.pythonhosted.org/packages/e5/16/00e3527c0410c809664136ed070d3abdcc480aa679c56247a5f8709f406e/tileIndexPythonGenerator-0.1.0.4.tar.gz" } ], "0.1.0.5": [ { "comment_text": "", "digests": { "md5": "99baaee294b65fc29c85c5c3455d05a5", "sha256": "9d3c9b329f063fffa5a87979ea3b0a07224a306f94f21b14f981ceba4acdd29e" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.5.tar.gz", "has_sig": false, "md5_digest": "99baaee294b65fc29c85c5c3455d05a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6278, "upload_time": "2018-08-15T17:57:10", "url": "https://files.pythonhosted.org/packages/e5/eb/45895f4948b0d52161b9e06e060792637f517bf9ff7dd60ff8b2bbd9777b/tileIndexPythonGenerator-0.1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99baaee294b65fc29c85c5c3455d05a5", "sha256": "9d3c9b329f063fffa5a87979ea3b0a07224a306f94f21b14f981ceba4acdd29e" }, "downloads": -1, "filename": "tileIndexPythonGenerator-0.1.0.5.tar.gz", "has_sig": false, "md5_digest": "99baaee294b65fc29c85c5c3455d05a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6278, "upload_time": "2018-08-15T17:57:10", "url": "https://files.pythonhosted.org/packages/e5/eb/45895f4948b0d52161b9e06e060792637f517bf9ff7dd60ff8b2bbd9777b/tileIndexPythonGenerator-0.1.0.5.tar.gz" } ] }