How can I programmatically rotate all the pages in a PDF using native macOS tools?

The flat nodes file is just a temporary file generated by the osm2pgsql program during import, so it isn't "located" anywhere. Instead, the --flat-nodes <flat nodes> input parameter, allows you to specify the location and filename where osm2pgsql should create this temporary file. Note that for Geofabrik's Europe extract, the generated flat nodes file is close to 50 GB, so make sure you have the disk space to accommodate this when specifying the location.

The flat nodes file is used to store all the nodes of the PBF file (>4.8 billion for current planet extract) to be imported, instead of storing all this temporary information in PostgreSQL. As it is optimized for this purpose, it is more efficient in terms of storage requirement.

As it needs to access this file a lot, setting the location to some form of fast (NVMe) SSD is probably highly beneficial.

By the way, I have found this excellent summary of all command line options of osm2pgsql highly useful: http://www.volkerschatz.com/net/osm/osm2pgsql-usage.html


Presumably you want to keep the logarithmic scaling on the y-axis, but you can't have ymin=0 with a logarithmic y-axis, so I changed that to 0.1. I suppose you want something like the example below. I simply specified the yticks and yticklabels manually. It may not be the most elegant solution, but it works at least.

\documentclass{article}
\usepackage{pgfplots} 
\begin{document} 
\begin{tikzpicture} 
\begin{semilogyaxis}[
  xmin=0, xmax=1, ymin=0.1, ymax=1,
  samples=1000,
  fill=blue,
  ytick={0.1,0.2,...,1},
  yticklabels={0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1}
] 
\addplot[black!50,thick ] 
(x,{exp(-1/2)*(1-exp((-2*x)/0.01))+(1/2)*exp(-1/2)*(1+exp((-2*x)/0.01))+(1/8)*(0.01)*exp(-1/2)*(1-exp((-2*x)/0.01))}); 
\addplot[red,thick ] (x,{exp(-(1/2)+x/2)+((0.01)/8)*(1-x)*exp(-(1/2)+x/2)}); 
\addplot[blue,thick ] (x,{-exp(-(1/2)-(2*x)/0.01)+(1/2)*x*exp(-(1/2)-(2*x)/0.01)+exp(-(1/2)+x/2)+(0.01/8)*(-exp(-(1/2)-(2*x)/0.01)+(1-x)*exp(-(1/2)+x/2))}); 
\end{semilogyaxis} 
\end{tikzpicture} 
\end{document}

enter image description here