Saravanan666/pypi-org huggingface dataset:
Package: geojsonformer
GeoJSON FormerLibrary that creates valid *.geojson files from shapely shapes.DependanciesThis component depends on two external python libraries:numpyshapelySupported shapely typesCurrently out of all the available shapely types supported ones are:PointLineStringPolygonExamples of usageAdding pointsSimple addition of points.fromgeojsonformer.geojsonformerimportGeoJSONfromshapely.geometryimportPointpoint1=Point([22.8515625,55.3791104480105])point2=Point([12.3046875,51.17934297928927])# Simply append points to objectgj=GeoJSON()gj.add_point(point=point1)gj.add_point(point2)Adding LineString objectsAddition of LineString which is constructed from multiple points.fromgeojsonformer.geojsonformerimportGeoJSONfromshapely.geometryimportPoint,LineStringpoint1=Point([22.8515625,55.3791104480105])point2=Point([12.3046875,51.17934297928927])linestring=LineString([point1,point2])# Append linestring to objectgj=GeoJSON()gj.add_linestring(line_string=linestring)Adding polygon objectsConstructing a Polygon object and then adding it to object.fromgeojsonformer.geojsonformerimportGeoJSONfromshapely.geometry.polygonimportPolygonpolygon=Polygon([[24.0765380859375,55.22589019607769],[25.3509521484375,55.22589019607769],[25.3509521484375,55.71164005362048],[24.0765380859375,55.71164005362048],[24.0765380859375,55.22589019607769]])gj=GeoJSON()gj.add_polygon(polygon=polygon)Add multiple shapes and write to fileGeoJSON supports adding multiple different shapely objects and then writing them all to a single .geojson file. Correctness of files can be tested onhttp://geojson.io.fromgeojsonformer.geojsonformerimportGeoJSONfromshapely.geometryimportPoint,LineStringfromshapely.geometry.polygonimportPolygonpoint1=Point([22.8515625,55.3791104480105])point2=Point([12.3046875,51.17934297928927])point3=Point([12.3046875,51.17934297928927])polygon=Polygon([[24.0765380859375,55.22589019607769],[25.3509521484375,55.22589019607769],[25.3509521484375,55.71164005362048],[24.0765380859375,55.71164005362048],[24.0765380859375,55.22589019607769]])gj=GeoJSON()gj.add_point(point=point1)gj.add_point(point2)gj.add_point(point3)gj.add_polygon(polygon=polygon)gj.add_linestring(line_string=LineString([point1,point2,point3]))gj.write_to_file(file_path='points.geojson')CompatabilityCompatability is currently restricted to >= python3.10.AuthorProject is created and maintained by Arminas Šidlauskas.
Package: geojsonhash
geojsonhashThis package is responsible for generating identifiers for geojson objects. To do so, it makes use of the pygeohash library in charge of generating the identifiers of the different points contained in the geojson.In this implementation, individual points are ignored, treating the input geojson as a set of polygons defining a surface. The polygons are sorted according to their coordinates while the northwest-most vertex of the polygons defines the starting point for encoding.InstallationTo install the package there are two options: through poetry or by using the pip commandPip command$pipinstallgeojsonhashPoetry$gitclonehttps://github.com/AdrianSeguraOrtiz/geojsonhash.git
$cdgeojsonhash
$poetryinstallExampleAn example is shown below:fromgeojsonhashimportget_geojson_idimportjsonwithopen("./resources/geojson.json")asgeo_d:geojson=json.load(geo_d)geojson_id=get_geojson_id(geojson)print(geojson_id)To run it through console we can do:$cdexamples
$pythonexample.py
Package: geojsonio
Open GeoJSON data ongeojson.iofrom Python.geojsonio.pyalso contains a command line utility that is a Python port ofgeojsonio-cli.UsageSend data to geojson.io and open a browser within pythonfromgeojsonioimportdisplaywithopen('map.geojson')asf:contents=f.read()display(contents)DataThere are two methods by whichgeojsonio.pygets geojson.io to render the data:Embedding the GeoJSON contents in the geojson.io URL directlyCreating an anonymous Github gist and embedding the gist id in the geojson.io URL.geojsonio.pyautomatically determines which method is used based on the length of the GeoJSON contents.
If the contents are small enough, they will be embedded in the URL. Otherwisegeojsonio.pycreates an anonymous
Gist on Github with the GeoJSON contents. Note: when an anonymous gist is created, the data is uploaded to Github
and a unique gist ID is created. If anyone else is able to obtain the gist ID, they will be able to see your data.Goes Great With GeoPandasgeojsonio.pyintegrates nicely withGeoPandasto
display data in aGeoDataFrame.Say you have a file containing the borders of all states calledstates.geojson. Each GeoJSON record has a
property called'Name'. Quickly display all the states whose names start with'M'importgeopandasasgpdimportgeojsoniostates=gpd.read_file('states.geojson')m_states=states[states['Name'].str.startswith('M')]geojsonio.display(m_states.to_json())This will open a browser to the geojson.io window with the polygons drawn on the slippy map.IPython Notebook IntegrationTo easily embed geojson.io in an iframe in a Jupyter/IPython notebook, use
theembed()methodembed(contents)Command Line InterfaceIt can also be used on the command line. Read or pipe a file$ geojsonio map.geojson
$ geojsonio < run.geojsonOptions:--print prints the url rather than opening it
--domain="http://custominstancedomain.com/"InstallationInstall withpip$ pip install geojsonio
Package: geojson-length
geojson-lengthCalculate the length of a GeoJSON LineString or MultiLineStringInstallation$ pip3 install geojson-lengthUsage>>>fromgeojson_lengthimportcalculate_distance,Unit>>>fromgeojsonimportFeature,LineString>>>line=Feature(geometry=LineString([[19.6929931640625,48.953170117120976],[19.5556640625,48.99283383694351]]))>>>calculate_distance(line,Unit.meters)10979.098283583924Note: You need to installpython-geojsonfirst or you can define GeoJSON as python dict:line={"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[19.6929931640625,48.953170117120976],[19.5556640625,48.99283383694351]]}}Run test suite$ pip install pytest$ poetry run pytest --color=yes --verbose --showlocals testsYou may need to runpoetry installfirst.CreditsThis package was created with Cookiecutter_ and theaudreyr/cookiecutter-pypackage`project template.The idea was inspired bygeojson-lengthpackage written in JS.LicenseFree software: MIT license
Package: geojsonpy
GeoJsonPyOpen GeoJSON data on geojson.io from Python.Table of contentsDescriptionRequirementFolderSetupUsageContributorsDescriptionThere are two methods by whichgeojsonpy.pygets geojson.io to render the data:Embedding the GeoJSON contents in the geojson.io URL directly
Creating an anonymous Github gist and embedding the gist id in the geojson.io URL.geojsonpy.pyautomatically determines which method is used based on the length of the GeoJSON contents. If the contents are small enough, they will be embedded in the URL. Otherwise geojsonio.py creates an anonymous Gist on Github with the GeoJSON contents. Note: when an anonymous gist is created, the data is uploaded to Github and a unique gist ID is created. If anyone else is able to obtain the gist ID, they will be able to see your data.Foldergeojsonpy
├── geojsonpy
│   ├── geojsonpy.py
├── README.md
├── setup.cgfRequirementsFor running each sample code:python:>= 3.7SetupInstall withpip:$ pip install geojsonpyUsageSend data to geojson.io and open a browser within python:from geojsonpy import display

with open('map.geojson') as f:
    contents = f.read()
    display(contents)It can also be used on the command line. Read or pipe a file$ geojsonpy map.geojson
$ geojsonpy < run.geojsonContributorsPietro LechthalerGitHub:https://github.com/pietrolechthaler
Package: geojson-pydantic
geojson-pydanticPydanticmodels for GeoJSON.Documentation:https://developmentseed.org/geojson-pydantic/Source Code:https://github.com/developmentseed/geojson-pydanticDescriptiongeojson_pydanticprovides a suite of Pydantic models matching theGeoJSON specification rfc7946. Those models can be used for creating or validating geojson data.Install$python-mpipinstall-Upip
$python-mpipinstallgeojson-pydanticOr install from source:$python-mpipinstall-Upip
$python-mpipinstallgit+https://github.com/developmentseed/geojson-pydantic.gitInstall with conda fromconda-forge:$condainstall-cconda-forgegeojson-pydanticContributingSeeCONTRIBUTING.md.ChangesSeeCHANGES.md.AuthorsInitial implementation by @geospatial-jeff; taken liberally fromhttps://github.com/arturo-ai/stac-pydantic/Seecontributorsfor a listing of individual contributors.LicenseSeeLICENSE
Package: geojson-rewind
geojson-rewindA Python library for enforcing polygon ring winding order in GeoJSONTheGeoJSONspec mandates theright hand rule:A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.This helps you generate compliant Polygon and MultiPolygon geometries.Note: Co-ordinates in the input data are assumed to be WGS84 with (lon, lat) ordering,as per RFC 7946. Input with co-ordinates using any other CRS may lead to unexpected results.Installationpip install geojson-rewindUsageAs a LibraryEnforce RFC 7946 ring winding order (input/output is a GeoJSON string):>>>fromgeojson_rewindimportrewind>>>input="""{...      "geometry": {   "coordinates": [   [   [100, 0],...                                             [100, 1],...                                             [101, 1],...                                             [101, 0],...                                             [100, 0]]],...                      "type": "Polygon"},...      "properties": {"foo": "bar"},...      "type": "Feature"}""">>>output=rewind(input)>>>output'{"geometry": {"coordinates": [[[100, 0], [101, 0], [101, 1], [100, 1], [100, 0]]], "type": "Polygon"}, "properties": {"foo": "bar"}, "type": "Feature"}'>>>type(output)<class'str'>Enforce RFC 7946 ring winding order (input/output is a python dict):>>>fromgeojson_rewindimportrewind>>>input={...'geometry':{'coordinates':[[[100,0],...[100,1],...[101,1],...[101,0],...[100,0]]],...'type':'Polygon'},...'properties':{'foo':'bar'},...'type':'Feature'}>>>output=rewind(input)>>>output{'geometry':{'coordinates':[[[100,0],[101,0],[101,1],[100,1],[100,0]]],'type':'Polygon'},'properties':{'foo':'bar'},'type':'Feature'}>>>type(output)<class'dict'>On the Console# Enforce ring winding order on a GeoJSON file$rewindin.geojson>out.geojson# fetch GeoJSON from the web and enforce ring winding order$curl"https://myserver.com/in.geojson"|rewindVersioninggeojson-rewind followssemantic versioning. For this project, the "API" also includes:CLI flags and optionsCLI exit codesIn line with common practice in the python community, geojson-rewind will drop compatibility with unsupported python versions without incrementing the major version.Acknowledgementsgeojson-rewindis a python port of Mapbox's javascriptgeojson-rewindpackage. Credit toTom MacWrightandcontributors.
Package: geojson-transformer
geojson_transformerA python library for transforming GPX data to GeoJSON format.
It also gives you the ability to extract data from the gpx file such as:
Total elevation, total distance, starting point, paired data.InstallationUse the package managerpipto install geojson_transformer.pipinstallgeojson-transformerUsagefromgeojson_transformerimportGeoJsonTransformer# Create an object from a gpx file.gpxfile=GeoJsonTransformer(path='path/to/my_gpx_file.gpx')# Returns the total distance between each point in the gpx file.gpxfile.total_distance# Returns the total cumulative elevation between each point in the gpx file.gpxfile.total_elevation# Returns the first lat/lon pair found in the file.gpxfile.starting_pointContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: geokakao
geokakaoThegeokakaopackage provides a convenient way to utilize the Kakao API for converting addresses into GeoPackages. This package allows you to extract coordinates (longitude and latitude) from provided addresses and integrate them into a DataFrame. You can then convert the enriched DataFrame back into the GeoPackage format, facilitating seamless integration of address data with geographic coordinates.FeaturesConvert addresses to coordinates (longitude and latitude) using the Kakao API.Integrate coordinate information into a DataFrame containing address data.Convert the enriched DataFrame back into the GeoPackage format.InstallationTo install thegeokakaopackage, you can use the following pip command:pipinstallgeokakaoUsageHere's a simple example of how to use the geokakao package:importgeokakaoasgkimportpandasaspd# Load your DataFrame with address informationdata={'Name':['국립공원공단 본사','국립공원연구원 본원','치악산국립공원사무소'],'Address':['강원특별자치도 원주시 혁신로 22','강원특별자치도 원주시 단구로 171','강원특별자치도 원주시 소초면 무쇠점2길 26']}df=pd.DataFrame(data)# Convert addresses to coordinates and integrate into the DataFramegk.add_coordinates_to_dataframe(df,'Address')df.to_csv('korea_np.csv',index=False,encoding='utf-8')# Save the enriched DataFrame to a GeoPackage fileinput_csv="korea_np.csv"output_gpkg="korea_np.gpkg"gk.csv_to_gpkg(input_csv,output_gpkg)
Package: geokey-cartodb
geokey-cartodbProvide API endpoints that can be used to import GeoKey data into CartoDB.Installgeokey-cartodb requires:Python version 2.7GeoKey version 1.6 or greaterInstall the extension from PyPI:pip install geokey-cartodbOr from cloned repository:cd geokey-cartodb
pip install -e .Add the package to installed apps:INSTALLED_APPS += (
    ...
    'geokey_cartodb',
)Migrate the models into the database:python manage.py migrate geokey_cartodbYou’re now ready to go!TestRun tests:python manage.py test geokey_cartodbCheck code coverage:coverage run --source=geokey_cartodb manage.py test geokey_cartodb
coverage report -m --omit=*/tests/*,*/migrations/*
Package: geokey-dataimports
geokey-dataimportsImport data from various formats (GeoJSON, KML, CSV) into GeoKey.Installgeokey-dataimports requires:Python version 2.7GeoKey version 1.6 or greaterInstall the geokey-dataimports from PyPI:pip install geokey-dataimportsOr from cloned repository:cd geokey-dataimports
pip install -e .Add the package to installed apps:INSTALLED_APPS+=(...'geokey_dataimports',)Migrate the models into the database:python manage.py migrate geokey_dataimportsCopy static files:python manage.py collectstaticYou’re now ready to go!Run within Docker containerIf you’re cloning the repository and have GeoKey running within a Docker container, configure it like such:Make sure repositories are cloned next to each other, e.g. file structure is:/MyProjects/geokey/
/MyProjects/geokey-dataimports/ModifyDockerfile(within “geokey” repository) so that it looks similar to:...
ADD /geokey /app
ADD /geokey-dataimports /extensions/geokey-dataimports
...
RUN pip install -e /app
RUN pip install -e /extensions/geokey-dataimportsModifydocker-compose.ymland add a new volume:...
volumes:
  - ./geokey:/app/geokey
  - ../geokey-dataimports/geokey_dataimports:/extensions/geokey-dataimports/geokey_dataimports
...You can also run migrations, make new ones, etc. usinggeokeycontainer. For example, to run only geokey-dataimports tests:docker-compose exec geokey python manage.py test geokey_dataimportsUpdateUpdate the geokey-dataimports from PyPI:pip install -U geokey-dataimportsMigrate the new models into the database:python manage.py migrate geokey_dataimportsCopy new static files:python manage.py collectstaticTestRun tests:python manage.py test geokey_dataimportsCheck code coverage:coverage run --source=geokey_dataimports manage.py test geokey_dataimports
coverage report -m --omit=*/tests/*,*/migrations/*
Package: geokey-duplicate
geokey-duplicateDuplicate project and categoriesDownload all observations
Currently supported formats:KMLGeoJSONXLXSInstallgeokey-duplicate requires:Python version 2.7GeoKey version 1.6 or greaterInstall the extension from PyPI:pip install geokey-duplicateOr from cloned repository:cd geokey-duplicate
pip install -e .Add the package to installed apps:INSTALLED_APPS+=(...'geokey_duplicate',)Migrate the models into the database:python manage.py migrate geokey_duplicateCopy static files:python manage.py collectstaticYou’re now ready to go!TestRun tests:python manage.py test geokey_duplicateCheck code coverage:coverage run --source=geokey_duplicate manage.py test geokey_duplicate
coverage report -m --omit=*/tests/*,*/migrations/*
Package: geokey-epicollect
geokey-epicollectUseEpiCollect’s phone app as a mobile client to collect data and store it withGeoKey.Installgeokey-epicollect requires:Python version 2.7GeoKey version 1.6 or greaterMake sure the dependencies are installed:sudo apt-get install libxslt1-dev libxml2-devInstall the extension from PyPI:pip install geokey-epicollectOr from cloned repository:cd geokey-epicollect
pip install -e .Add the package to installed apps:INSTALLED_APPS += (
    ...
    'geokey_epicollect',
)Migrate the models into the database:python manage.py migrate geokey_epicollectYou’re now ready to go!TestRun tests:python manage.py test geokey_epicollectCheck code coverage:coverage run --source=geokey_epicollect manage.py test geokey_epicollect
coverage report -m --omit=*/tests/*,*/migrations/*
Package: geokey-export
geokey-exportExport data from GeoKey into various formats.Currently supported formats:KMLGeoJSONCSVInstallgeokey-export requires:Python version 2.7GeoKey version 1.6 or greaterInstall the extension from PyPI:pip install geokey-exportOr from cloned repository:cd geokey-export
pip install -e .Add the package to installed apps:INSTALLED_APPS+=(...'geokey_export',)Migrate the models into the database:python manage.py migrate geokey_exportCopy static files:python manage.py collectstaticYou’re now ready to go!TestRun tests:python manage.py test geokey_exportCheck code coverage:coverage run --source=geokey_export manage.py test geokey_export
coverage report -m --omit=*/tests/*,*/migrations/*
Package: geokey-geotagx
geokey-geotagxImport results fromGeoTag-X.Installgeokey-geotagx requires:Python version 2.7GeoKey versions 0.9, 0.10, or 1.0Install the extension from PyPI:pip install geokey-geotagxOr from cloned repository:cd geokey-geotagx
pip install -e .Add the package to installed apps:INSTALLED_APPS += (
    ...
    'geokey_geotagx',
)You’re now ready to go!TestRun tests:python manage.py test geokey_geotagxCheck code coverage:coverage run --source=geokey_geotagx manage.py test geokey_geotagx
coverage report -m --omit=*/tests/*,*/migrations/*APITo import results POST a feature collection:POST /api/geotagx/:project_id/import/
Content-Type: application/json

{
    "type": "FeatureCollection",
    "features": []
}Returns (if successful):HTTP/1.1 201 Created

Objects created
Package: geokey-sapelli
geokey-sapelliExtension forGeoKeyto add support forSapelli. This extension enables users to uploadSapelli project files(resulting in corresponding GeoKey projects), and Sapelli-produced data via the admin interface.Installgeokey-sapelli requires:Python version 2.7Java(JRE or JDK) version 7 or upGeoKey version 1.6 or greaterInstall the geokey-sapelli from PyPI:pip install geokey-sapelliOr from cloned repository:cd geokey-sapelli
pip install -e .Add the package to installed apps:INSTALLED_APPS += (
    ...
    'geokey_sapelli',
)Download the latest available version of theSapelli Collector CmdLn front-end(the file you need looks likesapelli-collector-cmdln-X.X.X-XXXXXX-with-dependencies.jar). Place the file in a folder of your choice (you can rename it as well if you want) and edit thesettings.pyfile to add theabsolutepath to the file:SAPELLI_JAR = '/path/to/sapelli-collector-cmdln-X.X.X-XXXXXX-with-dependencies.jar'Register a new application (using the GeoKey admin interface) with authorisation typepassword. Add the generated Client ID to yoursettings.py:SAPELLI_CLIENT_ID = 'YOUR_CLIENT_ID'Migrate the models into the database:python manage.py migrate geokey_sapelliYou’re now ready to go!UpdateUpdate the geokey-sapelli from PyPI:pip install -U geokey-sapelliMigrate the new models into the database:python manage.py migrate geokey_sapelliTestRun tests:python manage.py test geokey_sapelliCheck code coverage:pip install coverage
coverage run --source=geokey_sapelli manage.py test geokey_sapelli
coverage report -m --omit=*/tests/*,*/migrations/*
Package: geokey-webresources
geokey-webresourcesExtend GeoKey projects by adding web resources: GeoJSON and KML.Installgeokey-webresources requires:Python version 2.7GeoKey version 1.6 or greaterInstall the geokey-webresources from PyPI:pip install geokey-webresourcesOr from cloned repository:cd geokey-webresources
pip install -e .Add the package to installed apps:INSTALLED_APPS += (
    ...
    'geokey_webresources',
)Migrate the models into the database:python manage.py migrate geokey_webresourcesYou’re now ready to go!UpdateUpdate the geokey-webresources from PyPI:pip install -U geokey-webresourcesMigrate the new models into the database:python manage.py migrate geokey_webresourcesTestRun tests:python manage.py test geokey_webresourcesCheck code coverage:pip install coverage
coverage run --source=geokey_webresources manage.py test geokey_webresources
coverage report -m --omit=*/tests/*,*/migrations/*Public APIGet all web resources of a projectGET /api/projects/:project_id/webresources/Request parameters:ParameterTypeDescriptionproject_idIntegerA unique identifier for the project.Response:The response contains an array of web resources. If the array is empty, then the project has no active web resources.[
    {
        "id": 46,
        "status": "active",
        "name": "Public Houses",
        "description": "All public houses in London.",
        "created": "2014-09-19T15:51:32.790Z",
        "modified": "2014-09-21T15:51:32.804Z",
        "dataformat": "KML",
        "url": "http://london.co.uk/public-houses.kml",
        "colour": "#000000",
        "symbol": null
    }
]Response status codes:CodeReason200The list of web resources has been returned successfully.404The project was not found (or user has no access to it).Get a single web resource of a projectGET /api/projects/:project_id/webresources/:webresource_id/Request parameters:ParameterTypeDescriptionproject_idIntegerA unique identifier for the project.webresource_idIntegerA unique identifier for the web resource.Response:{
    "id": 46,
    "status": "active",
    "name": "Train Stations",
    "description": "Train stations in Germany.",
    "created": "2015-09-15T09:40:01.747Z",
    "modified": "2016-01-10T07:12:01.827Z",
    "dataformat": "GeoJSON",
    "url": "https://germany.de/all-train-stations.geojson",
    "colour": "#ffc0cb",
    "symbol": '/media/webresources/symbols/train_stations.png'
}Response status codes:CodeReason200The web resource has been returned successfully.404The project or web resource was not found.
Package: geokrety-api
GeoKrety API Server enable to track GeoKrety objects. The system provides API endpoints to fetch the data, to modify and update it.DocumentationApi documentationis available online.LicenseThis project is currently licensed under the GNU General Public License v3. A copy of LICENSE.md should be present along with the source code.Code is based on fossasia/open-event-orga-serverhttps://github.com/fossasia/open-event-orga-server
Package: geokube
geokubeDescriptiongeokubeis an open source Python package for geoscience data analysis that provides the user with a simple application programming interface (API) for performing geospatial operations (e.g., extracting a bounding box or regridding) and temporal operations (e.g., resampling) on different types of scientific feature types like grids, profiles and points, usingxarraydata structures and xarray ecosystem frameworks such asxesmf.AuthorsLead Developers:Marco ManciniJakub WalczakMirko StojiljkovicInstallationRequirementsYou need to install xesmf and cartopy to use geokube. This can be done during the creation of conda virtual environment, as shown belowAdd or append conda-forge channelcondaconfig--addchannelsconda-forgeorcondaconfig--appendchannelsconda-forgeConda EnvironmentCreate virtual environment with installing xesmf and cartopy packagecondacreate-ngeokubepython=3.9xesmf=0.6.2cartopy-yActivate virtual environmentcondaactivategeokubeInstall geokube frameworkpythonsetup.pyinstall