OSMToolset.jl
Documentation for OSMToolset.jl
For details please go to the Reference section.
Aknowledgments
<sup>This research was funded in whole or in part by [National Science Centre, Poland][2021/41/B/HS4/03349]. </sup>
diff --git a/dev/index.html b/dev/index.html index ab9a775..04cef34 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -
Documentation for OSMToolset.jl
For details please go to the Reference section.
<sup>This research was funded in whole or in part by [National Science Centre, Poland][2021/41/B/HS4/03349]. </sup>
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 27 July 2023. Using Julia version 1.9.2.
Documentation for OSMToolset.jl
For details please go to the Reference section.
<sup>This research was funded in whole or in part by [National Science Centre, Poland][2021/41/B/HS4/03349]. </sup>
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 27 July 2023. Using Julia version 1.9.2.
OSMToolset.find_poi
— Methodfind_poi(filename::AbstractString; attract_config::AttractivenessConfig=__builtin_attract)
Generates a DataFrame
with points of interests and their attractivenss from a given XML filename
.
This DataFrame
can be later used with AttractivenessSpatIndex
to build an attractivenss spatial index.
The attractiveness values for the index will be used ones from the attract_config
file. By default builtin_attract_path
will be used but you can define your own index.
OSMToolset.AttractivenessConfig
— TypeRepresents the configuration of the data scraping process from OSM XML.
Only those pieces of data will be scraped that are defined here.
The configuration is defined in a DataFrame with the following columns: class
, key
, values
, points
, range
. Instead of the DataFrame a paths to a CSV file can be provided.
AttractivenessConfig()
- default inbuilt configuration for data scraping. Note that the default configuration can change with library updatesAttractivenessConfig(filename::AbstractString)
- use a CSV file with configurationAttractivenessConfig(df::DataFrame)
- use a DataFrame
OSMToolset.AttractivenessSpatIndex
— TypeAttractivenessSpatIndex(filename::AbstractString)
-AttractivenessSpatIndex(df::AbstractDataFrame)
Builds an attractivness spatial index basing on data in some CSV file o a DataFrame
The CSV file or DataFrame should have the following columns: - class - data class in attractiveness index, each class name creates attractiveness dimension - key - key in the XML file <tag> - values - values in the <tag> (a star "*"
catches all values) - points - number of influance points - range - maximum influence range in meters
When a DataFrame
is provided the additional parameter refLLA
can be provided for the reference LLA
coordinates in the spatial index. The spatial index works in the ENU coordinate system.
OSMToolset.attractiveness
— Methodattractiveness(sindex::AttractivenessSpatIndex, enu::ENU, aggregator::Function=+; explain::Bool=false)
Returns the multidimensional attractiveness measure for the given spatial index sindex
and enu
cooridanates. Note that the enu coordinates must use sindex.refLLA
as the reference point. If explain
is set to true the result will additionally contain details about objects used to calculate the attractiveness.
Attractiveness will be aggregagated in a way defined by the aggregator
paramterr
Missing docstring for attractiveness(::AttractivenessSpatIndex, ::Float64; ::Float64)
. Check Documenter's build log for details.
OSMToolset.calc_tiling
— Methodcalc_tiling(filename::AbstractString, latTileSize::Float64, lonTileSize::Float64)
Calculates recommended bounds, number of rows and columns for a given filename
and size of tile latTileSize
x lonTileSize
.
OSMToolset.calc_tiling
— Methodcalc_tiling(bounds::Bounds, latTileSize::Float64, lonTileSize::Float64)
Calculates recommended bounds, number of rows and columns for a given bounds
and size of tile latTileSize
x lonTileSize
.
OSMToolset.tile_osm_file
— Methodtile_osm_file(filename::AbstractString, [bounds::Bounds]; nrow::Integer, ncol::Integer, [out_dir::AbstractString]
Provide the tiling functionality for maps. A filename
will be open for processing and the tiling will be done around given bounds
. If bounds
are not given they will be calculated using getbounds
function. The tiling will be performed with a matrix having nrow
rows and ncol
columns. The output will be written to the folder name out_dir
. If none out_dir
is given than as the output is written to where filename
is located.
OSMToolset.BoundsTiles
— TypeA set of bounds for all tiles
Helper functions
OSMToolset.FloatLon
— TypeThis is an AbstractFloat type representing geographic longitude as the values may wrap around
OSMToolset.Node
— TypeNode
+Reference · OSMToolset.jl Reference
Measuring Attractiveness Spatial Index
OSMToolset.find_poi
— Methodfind_poi(filename::AbstractString; attract_config::AttractivenessConfig=__builtin_attract)
Generates a DataFrame
with points of interests and their attractivenss from a given XML filename
.
This DataFrame
can be later used with AttractivenessSpatIndex
to build an attractivenss spatial index.
The attractiveness values for the index will be used ones from the attract_config
file. By default builtin_attract_path
will be used but you can define your own index.
sourceOSMToolset.AttractivenessConfig
— TypeRepresents the configuration of the data scraping process from OSM XML.
Only those pieces of data will be scraped that are defined here.
The configuration is defined in a DataFrame with the following columns: class
, key
, values
, points
, range
. Instead of the DataFrame a paths to a CSV file can be provided.
- Constructors *
AttractivenessConfig()
- default inbuilt configuration for data scraping. Note that the default configuration can change with library updatesAttractivenessConfig(filename::AbstractString)
- use a CSV file with configurationAttractivenessConfig(df::DataFrame)
- use a DataFrame
sourceOSMToolset.AttractivenessSpatIndex
— TypeAttractivenessSpatIndex(filename::AbstractString)
+AttractivenessSpatIndex(df::AbstractDataFrame)
Builds an attractivness spatial index basing on data in some CSV file o a DataFrame
The CSV file or DataFrame should have the following columns: - class - data class in attractiveness index, each class name creates attractiveness dimension - key - key in the XML file <tag> - values - values in the <tag> (a star "*"
catches all values) - points - number of influance points - range - maximum influence range in meters
When a DataFrame
is provided the additional parameter refLLA
can be provided for the reference LLA
coordinates in the spatial index. The spatial index works in the ENU coordinate system.
sourceOSMToolset.attractiveness
— Methodattractiveness(sindex::AttractivenessSpatIndex, enu::ENU, aggregator::Function=+; explain::Bool=false)
Returns the multidimensional attractiveness measure for the given spatial index sindex
and enu
cooridanates. Note that the enu coordinates must use sindex.refLLA
as the reference point. If explain
is set to true the result will additionally contain details about objects used to calculate the attractiveness.
Attractiveness will be aggregagated in a way defined by the aggregator
function.
sourceOSMToolset.attractiveness
— Methodattractiveness(sindex::AttractivenessSpatIndex, latitude::Float64, longitude::Float64, aggregator::Function=+; explain::Bool=false)
Returns the multidimensional attractiveness measure for the given spatial index sindex
and lattitude
and longitude
If explain
is set to true the result will additionally contain details about objects used to calculate the attractiveness
sourceMissing docstring. Missing docstring for attractiveness(::AttractivenessSpatIndex, ::LLA; ::Function; ::Bool)
. Check Documenter's build log for details.
Tiling OSM file
OSMToolset.calc_tiling
— Methodcalc_tiling(filename::AbstractString, latTileSize::Float64, lonTileSize::Float64)
Calculates recommended bounds, number of rows and columns for a given filename
and size of tile latTileSize
x lonTileSize
.
sourceOSMToolset.calc_tiling
— Methodcalc_tiling(bounds::Bounds, latTileSize::Float64, lonTileSize::Float64)
Calculates recommended bounds, number of rows and columns for a given bounds
and size of tile latTileSize
x lonTileSize
.
sourceOSMToolset.tile_osm_file
— Methodtile_osm_file(filename::AbstractString, [bounds::Bounds]; nrow::Integer, ncol::Integer, [out_dir::AbstractString]
Provide the tiling functionality for maps. A filename
will be open for processing and the tiling will be done around given bounds
. If bounds
are not given they will be calculated using getbounds
function. The tiling will be performed with a matrix having nrow
rows and ncol
columns. The output will be written to the folder name out_dir
. If none out_dir
is given than as the output is written to where filename
is located.
sourceOSMToolset.BoundsTiles
— TypeA set of bounds for all tiles
sourceHelper functions
OSMToolset.FloatLon
— TypeThis is an AbstractFloat type representing geographic longitude as the values may wrap around
sourceOSMToolset.Node
— TypeNode
A node is a point in the map. It has an id, a latitude and a longitude.
-All nodes need to be stored in memory in this format.
sourceOSMToolset.Bounds
— TypeA range of geographic coordinates for a map
sourceOSMToolset.getbounds
— MethodReturn Bounds that can be found in the first 10 lines of the OSM file named 'filename'
sourceSettings
This document was generated with Documenter.jl version 0.27.25 on Thursday 27 July 2023. Using Julia version 1.9.2.
+All nodes need to be stored in memory in this format.
OSMToolset.Bounds
— TypeA range of geographic coordinates for a map
OSMToolset.getbounds
— MethodReturn Bounds that can be found in the first 10 lines of the OSM file named 'filename'
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 27 July 2023. Using Julia version 1.9.2.
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 27 July 2023. Using Julia version 1.9.2.
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 27 July 2023. Using Julia version 1.9.2.