<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Validate KML geometries in python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/validate-kml-geometries-in-python/m-p/1147380#M63865</link>
    <description>&lt;P&gt;Regex would probably be the way to go. &amp;nbsp;If you have a standard valid example of how each type should be, you can set up a regex match to validate, similar to how email addresses are validated.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2022 02:32:33 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-02-24T02:32:33Z</dc:date>
    <item>
      <title>Validate KML geometries in python</title>
      <link>https://community.esri.com/t5/python-questions/validate-kml-geometries-in-python/m-p/1145123#M63799</link>
      <description>&lt;P&gt;I have CSV file where in a column there are some KML geometries. These geometries can be points, lines, polygons etc. I would like to validate them and check if they are correctly written.&lt;/P&gt;&lt;P&gt;I'm reading the CSV with Pandas&lt;/P&gt;&lt;PRE&gt;import pandas as pd
csv = read_csv('file.csv')

#Let's take into account just the first location
coordinates = csv.['location'].loc[0] &lt;/PRE&gt;&lt;P&gt;coordinates would be:&lt;/P&gt;&lt;PRE&gt;&amp;lt;Point&amp;gt;&amp;lt;coordinates&amp;gt;2.34880,48.85341&amp;lt;/coordinates&amp;gt;&amp;lt;/Point&amp;gt;&lt;/PRE&gt;&lt;P data-unlink="true"&gt;I tried to proceed with&amp;nbsp;&lt;A href="https://fastkml.readthedocs.io/" target="_blank" rel="nofollow noopener noreferrer"&gt;fastKML&lt;/A&gt;, but it searches for a complete KML&lt;A href="https://deepmaterialit.com/" target="_self"&gt;&amp;nbsp;&lt;/A&gt;file to check and not just the string I got.&lt;/P&gt;&lt;P&gt;So I'm wondering, is there any possibility to validate directly the sting?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2022 19:53:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/validate-kml-geometries-in-python/m-p/1145123#M63799</guid>
      <dc:creator>AamirMurtaza43</dc:creator>
      <dc:date>2022-04-23T19:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Validate KML geometries in python</title>
      <link>https://community.esri.com/t5/python-questions/validate-kml-geometries-in-python/m-p/1147380#M63865</link>
      <description>&lt;P&gt;Regex would probably be the way to go. &amp;nbsp;If you have a standard valid example of how each type should be, you can set up a regex match to validate, similar to how email addresses are validated.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 02:32:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/validate-kml-geometries-in-python/m-p/1147380#M63865</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-02-24T02:32:33Z</dc:date>
    </item>
  </channel>
</rss>

