Saravanan666/pypi-org huggingface dataset:
Package: geoip2-tools
Automatic updates and administration of MaxMind GeoIP2 databases.To install geoip2-tools, run this command in your terminal:$pipinstallgeoip2-toolsThis is the preferred method to install geoip2-tools, as it will always install the most recent stable release.UsageTo use this library you must first obtain a license from Maxmind. It is free for the geolite2 version of the database.Sign up for a Maxmind Geolite2 accountLog in to your Maxmind accountIn the menu on the left, navigate toServices > My License Key.ClickGenerate new license key.Save your license key in a secure site.geoip2-tools downloads the latest version of the database and keeps it updated for you. By default every 7 days it is
downloaded from the Maxmind servers.fromgeoip2_tools.managerimportGeoip2DataBaseManagergeoip2_manager=Geoip2DataBaseManager('<license key>')print(geoip2_manager['country'].reader.country('1.1.1.1').country.name)# AustraliaGeoip2-tools has aliases for thecity,country, andasnGeolite2 databases. The country database is smaller than
city. The city database also contains the countries:city=geoip2_manager['country'].reader.city('<ip address>')print(city.city.name)print(city.country.name)To obtain the ASN you must use the asn database:asn=geoip2_manager['country'].reader.asn('<ip address>')print(asn.autonomous_system_number)print(asn.autonomous_system_organization)
Package: geoips
# # # Distribution Statement A. Approved for public release. Distribution unlimited.
# # #
# # # Author:
# # # Naval Research Laboratory, Marine Meteorology Division
# # #
# # # This program is free software: you can redistribute it and/or modify it under
# # # the terms of the NRLMMD License included with this program. This program is
# # # distributed WITHOUT ANY WARRANTY; without even the implied warranty of
# # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the included license
# # # for more details. If you did not receive the license, for more information see:
# # # https://github.com/U-S-NRL-Marine-Meteorology-Division/GeoIPS Base PackageThe GeoIPS Base Package provides a Python 3 based architecture supporting a wide variety of
satellite and weather data processing. The modular nature of the GeoIPS base infrastructure also allows
plug-and-play capability for user-specified custom functionality.InstallationSee the
installation guide (linux,mac,windows)
within the source code documentation for installation instructions. GeoIPS has a fully supported
exhaustive installation process, including a full conda environment, as well as a more basic
pip based installation for "expert" users.Creating your own GeoIPS PluginSee the instructions tosetup a new pluginif you are interested in creating your own functionality using the GeoIPS
infrastructure.ContributingAre you interested inNotifying the geoips team of bugs?Submitting a fix to a known bug?Contributing new functionality to the main geoips code base?Creating your own geoips-compatible plugin?We welcome all feedback and contributions!Please review ourcontributors guidefor more information.ContactPlease contactgeoips@nrlmry.navy.milwith any questions comments or concerns, and
for additional information about our regular user/developer meetings, Slack channel,
and other forms of communication.Slack ChannelFor those interested in contributing to GeoIPS, have informal feature requests, or
have lingering questions not answered by the documentation, feel free to join ourSlack Channel. If you are not permitted to join, emailgeoips@nrlmry.navy.milto request access.Acknowledgments and CitationsPlease display the following acknowledgment within all published research using this software:"This work uses the GeoIPS(R) software package written and
developed by the Naval Research Laboratory Marine Meteorology Division.
https://github.com/NRLMMD-GEOIPS/"SeeGeoIPS LICENSEfor
more information.https://github.com/NRLMMD-GEOIPS/geoips/blob/main/LICENSEDocumentationThe documentation can be found at:https://nrlmmd-geoips.github.io/geoips/
Package: geoips-clavrx
# # # Distribution Statement A. Approved for public release. Distribution unlimited.
# # #
# # # Author:
# # # Naval Research Laboratory, Marine Meteorology Division
# # #
# # # This program is free software: you can redistribute it and/or modify it under
# # # the terms of the NRLMMD License included with this program. This program is
# # # distributed WITHOUT ANY WARRANTY; without even the implied warranty of
# # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the included license
# # # for more details. If you did not receive the license, for more information see:
# # # https://github.com/U-S-NRL-Marine-Meteorology-Division/CLAVR-x GeoIPS Plugin PackageThe geoips_clavrx package is a GeoIPS-compatible plugin, intended to be used
within the GeoIPS ecosystem.
Please see theGeoIPS Documentationfor more information on the GeoIPS plugin architecture and base infrastructure.Package OverviewThe geoips_clavrx package provides the capability for reading and plotting
data files produced from the Clouds for AVHRR Extended package.This package does not currently include installation of clavrx itself, but
expects you are able to produce CLAVR-x outputs for ingest into geoips_clavrx.System Requirementsgeoips >= 1.6.1Test data repos contained in $GEOIPS_TESTDATA_DIR for tests to pass.IF REQUIRED: Install base geoips packageSKIP IF YOU HAVE ALREADY INSTALLED BASE GEOIPS ENVIRONMENTIf GeoIPS Base is not yet installed, follow theinstallation instructionswithin the geoips source repo documentation.Install geoips_clavrx package# Assuming you followed the fully supported installation,# using $GEOIPS_PACKAGES_DIR and $GEOIPS_CONFIG_FILE:source$GEOIPS_CONFIG_FILEgitclone-b$GEOIPS_ACTIVE_BRANCH$GEOIPS_REPO_URL$GEOIPS_PACKAGES_DIR/geoips_clavrxpipinstall-e$GEOIPS_PACKAGES_DIR/geoips_clavrxTest geoips_clavrx installation# Assuming you followed the fully supported installation,# using $GEOIPS_PACKAGES_DIR and $GEOIPS_CONFIG_FILE:source$GEOIPS_CONFIG_FILE# If you have all test data repos available:$GEOIPS_PACKAGES_DIR/geoips_clavrx/tests/test_all.sh
Package: geoipsets
Installationpip install geoipsetsUsageUtility output can be controlled using a configuration file and/or command line options. For the MaxMind provider type, this configuration file is required in order to provide the license-key. See theexamplefor details.The example file enables all options which is likely not what you want as it will generate IPv4 and IPv6 sets for both firewall types for all countries.Typically, you would want to select only one firewall type along with a short list of countries and perhaps only for the IPv4 address family.The utility will attempt to read the configuration file at/etc/geoipsets.confbut the location can be overidden using the--config PATH_TO_FILEcommand line option.usage:geoipsets[-h][-v][-p{dbip,maxmind}[{dbip,maxmind}...]][-f{iptables,nftables}[{iptables,nftables}...]][-a{ipv6,ipv4}[{ipv6,ipv4}...]][-lCOUNTRIES][-oOUTPUT_DIR][-cCONFIG_FILE][--checksum][--no-checksum]UtilitytobuildcountryspecificIPsetsforipset/iptablesandnftables.Commandlineargumentstakeprecedenceoverthoseintheconfigurationfile.

options:-h,--helpshowthishelpmessageandexit-v,--versionshowprogram'sversionnumberandexit-p{dbip,maxmind}[{dbip,maxmind}...],--provider{dbip,maxmind}[{dbip,maxmind}...]datasetprovider(s)(default:dbip)-f{iptables,nftables}[{iptables,nftables}...],--firewall{iptables,nftables}[{iptables,nftables}...]firewall(s)tobuildsetsfor(default:nftables)-a{ipv6,ipv4}[{ipv6,ipv4}...],--address-family{ipv6,ipv4}[{ipv6,ipv4}...]IPprotocol(s)tobuildsetsfor(default:ipv4)-lCOUNTRIES,--countriesCOUNTRIESPathtoafilecontaining2-charactercountrycodes,oneperline,oracomma-separatedlistofcountrycodes.Argumentistreatedasapathfirst.Ifitdoesnotresolve,ortheresolvedfileisinvalid,thenitisparsedasacomma-separatedlist.-oOUTPUT_DIR,--output-dirOUTPUT_DIRdirectorywheregeoipsetsshouldbesaved(default:/tmp)-cCONFIG_FILE,--config-fileCONFIG_FILEpathtoconfigurationfile(default:/etc/geoipsets.conf)--checksumenablechecksumvalidationofdownloadedfiles(default)--no-checksumdisablechecksumvalidationofdownloadedfiles
Package: geoiter
geoiteriterates the planet.A simple tool to iterate coordinates within given boundaries.
The usage is mostly for querying/searching by location.
Geoiter provides many locations within a boundary, like a country.
Let's say Germany has in sum 5000 houses to sell. Then most platforms will only allow you to visit the first 200 houses.
Now to get the others, you need to dissect the big boundary area into smaller ones.
And this is where geoiter provides you with coordinatesgeoitercan be used for web scraping to utilize geo/location queries:In many cases the web page restrict the result items to a fixed number.
With geoiter you can now dissect this one query to a many location queries to relax
the result density under the restriction limit.geoiter has only one additional dependency calledhaversine.installpip install geoiterusageimportpicklefromgeoiter.util.ressource_exampleimportgermanyfromgeoiterimportGeoIter# get you boundary for examplewithopen(germany,"rb")asfile:germany=pickle.load(file)# preparegi=GeoIter(boundary=germany,radius=100,comp_rate=20)if__name__=="__main__":# plot them as exampleforcoordinateingi:print(coordinate)speedone may consider that geo data have megabytes of coordinates. Which may make the iteration very slow,
because it needs to look up coordinates in the boundary often.
To accelerate thegeoiterprovides a very simple compressor and uses bisect instead of list iteration.
However, it still can be slow.extensionsThere two extensions which give additional helppip install geoiter["gpx]provides you with an gpx exporter.pip install geoiter["plot"]provides a plotting function to visualize the grid.dataget boundaries from osm or others sources likehttps://www.geoboundaries.org/https://osm-boundaries.com/...todoSRP for compressorMake own haversine calculation for fixed directions.Homepageon githubon pypiCopyright © 2022 Simon BauerPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: geojoin
Merge CSV data into GeoJSON features!Usage: geojoin [options] csv jsonMerges data from a comma- (or tab-, pipe-, etc.) separated file into theproperties of GeoJSON (or TopoJSON) features by joining on a foreign key,and prints the resulting feature collection to stdout.Options:-h, --help            show this help message and exit-f FK, --fk=FK        The CSV column and GeoJSON feature property name onwhich to join. This may either be a single string, ora colon-separated pair denoting the CSV column nameand GeoJSON feature property name, respectively. Thedefault is "id".-m MODE, --mode=MODE-p PROPS, --props=PROPSa comma-separated list of keys to merge or replace--prefix=KEY_PREFIX   The key prefix for merged or replaced keys-P, --pretty          Whether to pretty-print JSON (default: not pretty)--inner               Limit features to only those with values in the CSVdata.-F FS, --field-separator=FSThe CSV file field separator, default: ,-q FQ, --field-quote=FQThe CSV file field quote character, default: "
Package: geojson2fromto
Python module that converts LineStrings and MultiLineStrings of a
GeoJSON FeatureCollection to DECK.GL’s LineLayer ‘from-to’RequirementsPython 3 - 3.6. Python 3.7 doesn’t work due topyproj’s lack of
support for Python
3.7which is a
dependency ofgeopandaswhich hasit’s own related
issueto thisInstall$ pip install geojson2fromtoUsage$ geojson2fromto data.geojson [from-to-data.json]Note:To use the resulting JSON with Deck.GL’s LineLayer thecoordinateSystemprop of the LineLayer has to be set toCOORDINATE_SYSTEM.LNGLAT_EXPERIMENTALDev Install$ git@github.com:weaselandfox/geojson2fromto.git
$ cd geojson2fromto
$ pipenv installDev Usage$ pipenv shell
$ python ./geojson2fromto input.geojson [output.json]TestsMake sure you have activated a virtualenv (run$ pipenv shell)$ pytestLicenseMIT ©Weasel & Fox
Package: geojson2kml
geojson-to-kmlConvert GeoJSON to KML filepython-mgeojson2kml"examples/example1.geojson"--outdirexamplesDisplayThe name of the feature will be taken from thenameattribute if set, otherwise it will use theidof the feature. The attributes set in properites will be displayed as a table.{
    "type": "Feature",
    "id": 1,
    "name": "ABBOTT NEIGHBORHOOD PARK",
    "geometry": {
        "type": "Point",
        "coordinates": [
            -80.870885,
            35.215151
        ]
    },
    "properties": {
        "name": "ABBOTT NEIGHBORHOOD PARK",
        "address": "1300  SPRUCE ST"
    }
}FoldersYou can group features by folder by speciying--folder-attributeand the name of the property attribute that should be used to group by.StylingYou can configure the styling of objects by adding these as properties on the feature:PropertyDefaulticonstyle.icon.hrefhttps://maps.google.com/mapfiles/kml/paddle/red-circle.pngiconstyle.colorFFFFFFFFiconstyle.scale1.0labelstyle.scale1.0linestyle.colorFFFFFFFFlinestyle.width5polystyle.colorFFFFFFFF
Package: geojson2osm
geojson2osmA Python package to convert GeoJSON data to OSM XML format.Inspired FromgeojsontoosmInstallpip install geojson2osmUsageimportjsonfromgeojson2osmimportgeojson2osm# Load your GeoJSON datageojson_data=json.load(open('your_geojson_file.geojson'))# Convert the GeoJSON data to OSM XML formatosm_xml=geojson2osm(geojson_data)# Save the OSM XML data to a filewithopen('output.osm','w')asoutput_file:output_file.write(osm_xml)
Package: geojson2vt
Usagegeojson2vt# build an initial index of tilestile_index=geojson2vt(geojson,{})# request a particular tilefeatures=tile_index.get_tile(z,x,y).get('features')# show an array of tile coordinates created so farprint(tile_index.tile_coords)# [{'z': 0, 'x': 0, 'y': 0}, ...]You can fine-tune the results with an options object,
although the defaults are sensible and work well for most use cases.By default, tiles at zoom levels aboveindexMaxZoomare generated on the fly, but you can pre-generate all possible tiles for data by settingindexMaxZoomandmaxZoomto the same value, settingindexMaxPointsto 0, and then accessing the resulting tile coordinates from thetile_coordsproperty oftile_index.ThepromoteIdandgenerateIdoptions ignore existingidvalues on the feature objects.geojson2vt only operates on zoom levels up to 24.tile_index=geojson2vt(data,{'maxZoom':14,# max zoom to preserve detail on; can't be higher than 24'tolerance':3,# simplification tolerance (higher means simpler)'extent':4096,# tile extent (both width and height)'buffer':64,# tile buffer on each side'lineMetrics':False,# whether to enable line metrics tracking for LineString/MultiLineString features'promoteId':None,# name of a feature property to promote to feature.id. Cannot be used with `generateId`'generateId':False,# whether to generate feature ids. Cannot be used with `promoteId`'indexMaxZoom':5,# max zoom in the initial tile index'indexMaxPoints':100000# max number of points per tile in the index},logging.INFO)vt2geojson# build an initial index of tilestile_index=geojson2vt(geojson_data,{})# get a specific tilevt_tile=tile_index.get_tile(z,x,y)# convert a specific vector tile to GeoJSONgeojson=vt2geojson(vt_tile)AcknowledgementsAll the credit belongs to the collaborators of JS GeoJSON-VT.
Package: geojsonboundingbox
GeoJSON to bounding box utilityThis utility will find the minimum and maximum coordinates in a given GeoJSON file and format them as a GeoJSON bounding box.It is more of a proof-of-concept and it will sometimes fail. Please contact the author with feedback.Usagepython-mgeojsonboundingbox"/path/to/myfile.geojson"For anything more advanced, please look into theshapelyPython library.
Package: geojsonchemy
GeoJSONchemy [Under Development] 🌍🧪GeoJSONchemy is a Python library that provides support for GeoJSON spatial data types in SQLAlchemy and SQLModel. It allows you to easily work with GeoJSON data in your database models. It currently supports ONLY PostgreSQL-PostGIS.Installation 📦You can install GeoJSONchemy using pip:pipinstallgeojsonchemyUsage 🚀SQLAlchemy
In SQLAlchemy, you can use theGeomJSONandGeomdanticclasses from GeoJSONchemy as types for your model fields. Both are subclasses fromgeoalchemy2.types.GeometryHere's an example:fromsqlalchemyimportColumn,Integerfromsqlalchemy.ext.declarativeimportdeclarative_basefromsqlalchemy.ormimportMapped,mapped_columnfromgeojsonchemyimportGeomJSON,Geomdanticfromgeojson_pydantic.geometriesimportGeometry,Point,MultiPlolygonBase=declarative_base()classFooModel(Base):__tablename__='foo'id:Mapped[int]=Column(Integer,primary_key=True)geom:Mapped[dict]=mapped_column(GeomJSON(geometry_type="POINT",srid=4326),nullable=False,index=True)geom2:Mapped[Geometry]=mapped_column(Geomdantic(geometry_type="GEOMETRY",srid=4326),nullable=False,index=True)SQLModelInSQLModel, you can use theGeomJSONandGeomdanticclasses in a similar way:fromsqlmodelimportField,SQLModelclassGeomTable(SQLModel,table=True):__tablename__="bar"id:int=Field(primary_key=True)name:strgeom:dict=Field(sa_type=GeomJSON(geometry_type="GEOMETRY",srid=4326),nullable=False,)geom2:Point=Field(sa_type=Geomdantic(geometry_type="POINT",srid=4326),nullable=False,)Note 📝Please note that GeoJSONchemy currently only supports PostgreSQL. If you try to use it with a different database, it will raise a NotImplementedError.Contributing 🤝Contributions are welcome! Please feel free to submit a pull request.TODOAdd support for MutableDictLicense 📄GeoJSONchemy is licensed under the MIT license. See the LICENSE file for more details.
Package: geojsoncontour
geojsoncontourA Python 3 module to convert matplotlib contour plots to geojson. Supports both contour and contourf plots.Designed to show geographicalcontour plots,
created withmatplotlib/pyplot, as vector layer on interactive slippy maps likeOpenLayersandLeaflet.Demo project that uses geojsoncontour:climatemaps.romgens.comInstallationInstall with pip,pip install geojsoncontourUsageUsecontour_to_geojsonto create a geojson with contour lines from amatplotlib.contourplot (not filled).
Usecontourf_to_geojsonto create a geojson with filled contours from amatplotlib.contourfplot.Contour plot to geojsonimportnumpyimportmatplotlib.pyplotaspltimportgeojsoncontour# Create contour data lon_range, lat_range, Z<yourcodehere># Create a contour plot plot from grid (lat, lon) datafigure=plt.figure()ax=figure.add_subplot(111)contour=ax.contour(lon_range,lat_range,Z,cmap=plt.cm.jet)# Convert matplotlib contour to geojsongeojson=geojsoncontour.contour_to_geojson(contour=contour,ndigits=3,unit='m')For filled contour plots (matplotlib.contourf) usecontourf_to_geojson.
Seeexample_contour.pyandexample_contourf.pyfor simple but complete examples.Show the geojson on a mapAn easy way to show the generated geojson on a map is the online geojson renderergeojson.ioorgeojson.tools.Style propertiesStroke color and width are set as geojson properties followinghttps://github.com/mapbox/simplestyle-spec.Create geojson tilesTrygeojson-vtortippecanoeif performance is an issue and you need to tile your geojson contours.DevelopmentTestsRun all tests,python -m unittest discoverReleaseInstall setuptools, wheel and twine:python -m pip install --upgrade setuptools wheel twineIncrease the version number insetup.py.Create dist:python setup.py sdist bdist_wheelUpload:twine upload dist/*
Package: geojson_elevation
GeoJSON proxy to popular elevation web services.Currently only Google Elevation API is implemented.New backends or improvements very welcome!Install stable version from pypiInstall via pip:pip install geojson_elevationInstall development versionInstall tarball:pipinstallhttps://github.com/ninuxorg/python-geojson-elevation/tarball/masterAlternatively you can install via pip using git:pipinstall-egit+git://github.com/ninuxorg/python-geojson-elevation#egg=geojson-elevationIf you want to contribute, install your cloned fork:gitclonegit@github.com:<your_fork>/python-geojson-elevation.gitcdpython-geojson-elevationpythonsetup.pydevelopBasic Usage Examplefromgeojson_elevation.googleimportelevation# 1 pointelevation('41.889040454306752,12.525333445447737')# pathelevation('41.889040454306752,12.525333445447737|41.889050454306752,12.525335445447737')Running testsInstall your forked repo:gitclonegit://github.com/<your_fork>/python-geojson-elevationcdpython-geojson-elevation/pythonsetup.pydevelopInstall test requirements:pipinstall-rrequirements-test.txtRun tests with:./runtests.pyAlternatively, you can use thenosecommand (which has a ton of available options):nosetestsnoseteststests.google_tests# run only google elevation API testsSee test coverage with:coveragerun--source=geojson_elevationruntests.py&&coveragereportContributeJoin themailing listFork this repo and install itFollowPEP8, Style Guide for Python CodeWrite codeWrite tests for your codeEnsure all tests passEnsure test coverage is not under 90%Document your changesSend pull request
Package: geojson-fixer
GeoJSON FixerPackage to fix minor GeoJSON schema violationsFree software: MIT licenseDocumentation:https://geojson-fixer.readthedocs.io.FeaturesRemoves objects that don’t confirm to GeoJSON standards (in collections too)Polygons with 3 nodes, change to 4 nodes using linear interpolation between two of the nodes.To DoWrite testsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-03-18)First release on PyPI.
Package: geojsonformat
GeoJSON formatFormatting geojson with each feature on its own lineRequirementsPython: >=3.5Installationpython-mpipinstallgeojsonformatUsage exampleInput:{"type":"FeatureCollection","name":"ne_50m_admin_0_countries_lakes","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"featurecla":"Admin-0 country","scalerank":1},"geometry":{"type":"Polygon","coordinates":[[[26.1474609375,56.78884524518923],[25.521240234375,56.24334992410525],[26.54296875,55.979945357882315],[27.158203125,56.52919914018469],[27.290039062499996,56.90900226702048],[26.1474609375,56.78884524518923]]]}},{"type":"Feature","properties":{"featurecla":"Admin-0 country"},"geometry":{"type":"Polygon","coordinates":[[[26.1474609375,56.78884524518923],[25.521240234375,56.24334992410525],[26.54296875,55.979945357882315],[27.158203125,56.52919914018469],[27.290039062499996,56.90900226702048],[26.1474609375,56.78884524518923]]]}}]}Formatting:geojsonformatinput.geojsonout.geojsonOutput:{"type":"FeatureCollection","name":"ne_50m_admin_0_countries_lakes","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"featurecla":"Admin-0 country","scalerank":1},"geometry":{"type":"Polygon","coordinates":[[[26.1474609375,56.78884524518923],[25.521240234375,56.24334992410525],[26.54296875,55.979945357882315],[27.158203125,56.52919914018469],[27.290039062499996,56.90900226702048],[26.1474609375,56.78884524518923]]]}},{"type":"Feature","properties":{"featurecla":"Admin-0 country"},"geometry":{"type":"Polygon","coordinates":[[[26.1474609375,56.78884524518923],[25.521240234375,56.24334992410525],[26.54296875,55.979945357882315],[27.158203125,56.52919914018469],[27.290039062499996,56.90900226702048],[26.1474609375,56.78884524518923]]]}}]}