0

I have a KML file that has multiple coordinates. I want to trim the coordinates to see if it will reduce the size.

CHANGES The LatLng is different and not in a consistent format. Below is a sample of the LatLng that I have within my file. My apologies for not using a more accurate capture I didn't realize that it would affect the RegEx.

20.0649556884364,42.546758117893,0
-6.665609089909049,61.4394550582227,0
142.843146200241,54.2804088338613,0

This goes on for awhile as it is a multigeometry polygon. I would like to reduce the LatLng to 20.1234,20.1234

How do I remove the last 9 digits leaving only 4 after the period?

JeremyA1
  • 498
  • 1
  • 7
  • 19
  • http://stackoverflow.com/questions/20286068/regex-find-replace-in-notepad does that help a bit? you just need to tailor the regex to your need and fiddle with the return variables \1 and such – Tschallacka May 21 '15 at 06:34
  • I'm working with this one but even the updated one does not work for notepad++ 6.3 – JeremyA1 May 21 '15 at 06:39

1 Answers1

3

Find what:

(\.\d{4})\d+

Replace with:

$1

DEMO

Avinash Raj
  • 160,498
  • 22
  • 182
  • 229