Aug 24, 2022 14:38
you bet!
Aug 24, 2022 14:36
You bet, and good luck!
Aug 24, 2022 14:27
That should work also, yes. It's slightly better because it uses a good library
Aug 24, 2022 14:25
I think you have to convert UTM to pixel yourself based on the edges, but I think you've already done that part
Aug 24, 2022 14:21
let me see if I can find the reverse transofmration
Aug 24, 2022 14:18
Oh wait, my bad, you're going the other way
Aug 24, 2022 14:18
I copied their code to pastebin.com/e6Sv7bwJ
Aug 24, 2022 14:16
You could cheat and use the CSV on engineeringtoolbox.com/utm-latitude-longitude-d_1370.html which allows multiple entries at once
Aug 24, 2022 14:15
OK, let's see if we can find a formula
Aug 24, 2022 14:14
I get it-- the coordinates on the map are UTM
Aug 24, 2022 14:13
You're right, but it seems like you've already translated the data to latitude and longitude, now we just need to know more about concatenate.jpg -- that's an image you from Sentinel?
Aug 24, 2022 14:12
What projection is concatenate.jpg ?
Aug 24, 2022 14:11
OK, but that doesn't tell you what projection your specific map is in?
Aug 24, 2022 14:09
(actually, you may need to divide, but the key is that longitude degree is smaller than a latitude degree except at the equator)
Aug 24, 2022 14:08
OK, when computing longitude distance, multiply by the cosine of the central latidude
Aug 24, 2022 14:08
That's also not a projection. A projection is how a map converts latitude and longitude to pixels (in computer graphics)
Aug 24, 2022 14:08
Wait, I don't think WGS84 is a projection? I'm guessing it's Mercator.
Aug 24, 2022 14:08
What projection is the original map? In non-cylindrical projections such as Mercator, one degree of latitude uses a different number of pixels that one degree of longitude.
 
Aug 15, 2022 15:04
sure thing... when you get back: what is the project? Something like commoncrawl.org? My email is [email protected]
Aug 15, 2022 15:02
Right.. and you're using single quotes to quote the double quotes?
Aug 15, 2022 14:59
And the special characters didn't create any issues?
Aug 15, 2022 14:57
Personally, when I see a directory whose ls -ld shows it's over 1M, I clean it up and move everything to a new directory
Aug 15, 2022 14:56
Also, if you create directories with millions of files at the top level, operations like ls get very slow
Aug 15, 2022 14:56
You only have a finite number of inodes
Aug 15, 2022 14:56
do df -i
Aug 15, 2022 14:55
That might be overkill in the other direction-- having a billion... no, Unix does have a limit
Aug 15, 2022 14:55
If you could structure the data in such a way that it's "byte aligned" (or whatever), you could use a text file. I actually do that with large chunks of data
Aug 15, 2022 14:54
I mean databases would be the obvious next step
Aug 15, 2022 14:53
That would be my guess too. To be fair, actually trying to move around billions of characters inside a file would be insanely painful
Aug 15, 2022 14:49
I see only a few special characters in those strings-- add more and see if it still does what you want.
Aug 15, 2022 14:45
I have at least one Perl program somewhere with 8 backslashes in a row, so I feel your pain, but I don't see an easy workaround-- the hex thing may work, treat characters as bytes-- you might be able to write your own short C code to do this, but even C treats things like \n as newlines
Aug 15, 2022 14:39
And --posix of course
Aug 15, 2022 14:36
superuser.com/questions/532420/sed-without-regex suggests using hex codes-- you can also quote with single apostrophes to stop a lot of the regex matching
Aug 15, 2022 14:35
tr might also work
Aug 15, 2022 14:34
You can use a small text file to test-- I think there must be ... let me poke around. Have you looked at ed?
Aug 15, 2022 14:32
I mean, you can always backslash special characters (but double check that you get the right thing as the shell might interpret the backslash first)
Aug 15, 2022 14:31
Super large files can be useful if they have some byte-based structure. For example, if you know where the data you need is.. let me check re sed
Aug 15, 2022 14:30
OK, then sed -i should work
Aug 15, 2022 14:30
Oh, then what was the problem using sed or whatever?
Aug 15, 2022 14:29
Do you have 74GB free?
Aug 15, 2022 14:29
I think your lack of diskspace is going to be fatal though
Aug 15, 2022 14:29
Right, make a 1GB file and edit that, repeat 74 times, glue results
Aug 15, 2022 14:28
Oh, so you could process it one block at a time?
Aug 15, 2022 14:28
Sometimes given as ^@
Aug 15, 2022 14:27
ASC character 0
Aug 15, 2022 14:27
Also, is the whole thing a single JSON object, or multiple objects you could break apart programatically?
Aug 15, 2022 14:27
Do you know if your file has a large chunk of nulls in it? That sometimes happens with bad file writes
Aug 15, 2022 14:25
Oh, then gawk is just writing to a temporary file and will do a 'mv' later, which is technically not in-place editing
Aug 15, 2022 14:24
Can you share any details of how you got this file-- can you recreate it, etc?