Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created some KML files by converting the projection with both ARC and MapWindow. I'm looking for ways to automate exporting the data from our application with coordinates in State Plane "ESRI:102272" to something that can be used in Google Earth.

While I'm not a GIS Pro or a Web Developer, I know just enough to export and create maps.

I'm looking to create some kml files to share on our webserver. Can proj4js be used to convert the coordinates within the file?

Any thoughts on this process would be greatly appreciated.

share|improve this question
ESRI: 102272 is also EPSG: 2791 (we changed its well-known ID) in ArcGIS back around 9.1. It's NAD83(HARN) / Illinois West aka NAD_1983_HARN_Stateplane_Illinois_West_FIS_1202 – mkennedy Sep 6 '12 at 18:17
Are you looking for fully automated process, or are you comfortable with some level of scripting? If I gave you little python snippet, could you use it? – user890 Sep 8 '12 at 12:25

You wouldn't use Proj4js (the "js" part is Javascript, so client-side browser stuff)...but you can use Proj4.

It'd make more sense to convert your coordinates before you put them into KML. KML expects values to be in Decimal Lat/Lon/Elevation, so no point creating KML with "bad" projection and then converting.

So you could do a 1-time process inside your database and re-project all the columns, and then whenever new values are entered you re-project them and enter in some shadow columns, or you can do it during export. Implementation depends on how you "export" the data out of your applications. But you should be able to hook it up to proj4 or cs2cs (see proj4).

share|improve this answer
This does make more sense, thanks for the feedback. I’ve looked at the Proj4 site and have found some excellent information. It has also opened up additional searches to other automated tools that may benefit someone working in a non-GIS position like myself. As I research these and find a solution, I will post the results. Thanks again…. – Rich Sep 7 '12 at 13:32

You can use OGR to convert to a kml. I assume (not totally sure) that reprojection is inherent because kml always has to be in EPSG:4326. Use:

ogr2ogr -f kml -t_srs EPSG:4326 output.kml input.shp

You may/may not need -t_srs EPSG:4326. You can use this call in a batch script to generate your kml files.

If you just want to reproject the points, then you cs2cs or gdaltransform (which is a wrapper for cs2cs that accepts more than just proj.4 strings.

share|improve this answer

Use the database spatial functions. Look for ST_Transform().

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.