Public urination is generally considered as a bad thing, in particular in built-up areas. An effective method to reduce public urination is through opening public toilets. Though these are a public service, public toilets are usually for-pay services.
Some people, for instance Richard M. Stallman, argue that requiring people to pay for using a toilet is immoral. However, paying people to use these facilities is not necessary to cover the costs of public restrooms.
As it happens to be, human urine is rich in phosphorus, an essential element for life as we know it and a major component of fertilizer, hence a valuable commodity. The recovery of phosphorus from urine is already done at several places around the world, here an example from Amsterdam. The sale of recovered phosphorus could be used to cover the expenses of public toilets.
At the moment urine phosphorus recovery is focused on males, as it relies upon the use of urinals. Urinals are preferred as they collect pure, uncontaminated urine, which is easier to process. Fortunately, urinals designed for female use also exist. This way more phosphorus could be recovered and hence more revenue generated.
Public toilets can also be designed as composting toilets. These convert human feces to compost, hence the name, which could be sold off to gardeners. So we can fund public sanitation without charging people to use these facilities.