Skip to content

A Python tool that generates geographical data out of a provided KML

Notifications You must be signed in to change notification settings

TimLangePN/PolyFiller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolyFiller

PolyFiller is a tool written in Python to generate location based points within a certain geographical area.
By reading through a provided .KML file it generates points within that area.


Dependencies

PolyFiller uses the following libraries and it's dependencies:

  • fastkml
  • Geometry
  • PySimpleGUI
  • Shapely
  • mapbox

KML Requirements

To generate the best possible CSV file the following things have to be in order:


The name header and filename:

<name>FR_Toulouse</name>       <!--country_prefix + city_name-->

The polygon attributes:

<name>55</name>                                         <!--zone_code-->
<description><![CDATA[<p>4 - 4,99</p>]]></description>  <!--tariff_range-->
<styleUrl>#style4</styleUrl>                       <!--correct styleUrl-->

The coordinates:

<coordinates>
    1.4296621437324202,43.59769370449716,0.000
    1.4297810655126266,43.59739690720332,0.000
    1.4233531058265607,43.59631504510464,0.000      <!--A well formed polygon-->
    1.4232247343,43.5966013783,0.000
    1.4296621437324202,43.59769370449716,0.000
</coordinates>

Output CSV

ZONE_CODE LAT LON CITY DISPLAY_STREETNAME GOOGLE_STREETNAME ZONE_STREET ZONE_DESCRIPTION Tariff_range Unieke ID
55 43,59721367 1,428610331 Toulouse Avenue Étienne Billières Avenue Étienne Billières Avenue Étienne Billières Toulouse - Zone 55 3 - 3,99 FRTOU35

About

A Python tool that generates geographical data out of a provided KML

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages