Five tries to drop a pin

Five coordinate sources, one building in Arrecife, ranked by what actually landed.

Five tries to drop a pin

I’m building a small mobile-first map guide for Pitaya Coliving in Arrecife — Leaflet, JSON, no backend, around 50 hand-picked spots. The home base pin had to land on the actual building. Not the neighborhood, not the street, the building.

I underestimated this. I went through five coordinate sources before getting it right.

The progression

First attempt was the lazy way: zoom Google Maps to the area I thought the coliving was in, copy the URL, paste the @lat,lng. The URL looked like .../place/Pitaya+Coliving/@28.9496206,-13.5911184,14z/. The pin rendered five kilometers off. The @ in a Maps URL is the viewport center, not the place’s coordinates, and at zoom 14 that viewport center can be anywhere in a big chunk of the island.

Second attempt, zoom 17. Lng off by 200 meters. Third, zoom 21, basically the building level. Around 70 meters off. Wrong block of the same street.

I went looking for the actual address: Calle Jacinto Borges Díaz, 57, 35500 Arrecife. Nominatim returned the street but not house number 57. Photon, same. OpenStreetMap doesn’t have house-number data for most of Lanzarote’s smaller streets, which is fair. Nobody’s mapped them.

Then I remembered the Spanish Cadastre. Catastro has every parcel in Spain registered with coordinates, free, no key. The flow is two steps: Consulta_DNPLOC with the structured address returns a 14-character reference like 1746712DS4014N, then Consulta_CPMRC with that RC returns lat/lng in WGS84, directly usable by Leaflet. Ten seconds of curl. Landed within 15 meters.

Still not the entrance. The parcel centroid sits inside the lot, and on a long building that can be off by a room or two.

Last try, I rotated a fresh Google Places API key and made one call to the new Places API (places.googleapis.com/v1/places:searchText) with the query "Pitaya Coliving Arrecife Lanzarote". It returned Google’s own business pin, the one a human dropped at the entrance, on the street side, where you’d actually walk in. One call, about $0.017. That matched.

What to reach for, by case

For a known business by name, Places is unbeatable — costs cents, lands on the entrance. For a raw street address, Catastro. For named POIs and landmark-level stuff, Nominatim or Photon work fine. The @ from a Maps URL only works if you clicked the actual pin at zoom 19 or higher; most of the time you’ll be looking at viewport center.

What surprised me was how each step compressed the error by an order of magnitude. Five kilometers, two hundred meters, seventy meters, fifteen meters, the entrance. I had been treating the @ URLs as authoritative because they looked precise. Seven decimal places, after all. The decimal places were lying.

The other thing worth holding onto: Catastro is infrastructure the Spanish state offers for free and almost nobody outside the property industry uses. SOAP-flavored endpoints, XML responses, docs in Spanish. Works fine. I’ll be reaching for it again.