4

I have created an entry at www.spatialreference.org of a customized .prj file.

http://www.spatialreference.org/ref/sr-org/7973/

I'm trying to add the generated geoserver entry to the EPSG.Properties file. Upon a restart, Geoserver does not recognize my custom projection that I have attempted to add. Reviewing the logs is not indicating any issues, its as if I didn't change the EPSG.properties file at all. I have confirmed, in the log, that I'm using the right EPSG.properties file.

Any guidance would be greatly appreciated.

UPDATE:

The mystery has deepened, but I think I resolved my immediate problem through trial and error. My EPSG.properties file had another entry in it that I had successfully added months ago, and it was loading fine. So, copied its entry, and then replaced values and parameters from the 7973 projection I wanted. Change, Restart, Check it. Eventually, I was able to change all the parameters, and changed the description, and it shows up in my SRS List.

Where the mystery deepens, I then tried to take out the junk entries between my two good entries, and it broke.

Here are my EPSG Entries:

/This one works/ 6948=PROJCS["NAD_1927_StatePlane_Wisconsin_South_FIPS_4803",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",2000040.0],PARAMETER["False_Northing",-780.0],PARAMETER["Central_Meridian",-90.0],PARAMETER["Standard_Parallel_1",42.73333333333333],PARAMETER["Standard_Parallel_2",44.06666666666667],PARAMETER["Latitude_Of_Origin",42.0],UNIT["US_Foot",0.3048006096012192],AUTHORITY["EPSG","6948"]]

/*This one does not work, and originated from www.spatialreference.org */ 7973=PROJCS["NAD_1983_HARN_UTM_Zone_18N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",1640416.666666667],PARAMETER["central_meridian",-75.0],PARAMETER["scale_factor",0.9996],PARAMETER["latitude_of_origin",0],UNIT["US_Foot",0.3048006096012192],AUTHORITY["EPSG", "7973"]]

/*This was my copied 6948, which I modified one parameter at a time, it worked, but then removing 7973 above broke it! */ 96948=PROJCS["NAD_1983_HARN_UTM_ZONE_18N_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Latitude_Of_Origin",0],PARAMETER["scale_factor",0.9996],UNIT["US_Foot",0.3048006096012192],AUTHORITY["EPSG","96948"]]

/*So, then I added it a second time, as EPSG = 97973 */ 87973=PROJCS["PHI_NAD83_UTM_ZONE18N_FEET",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Latitude_Of_Origin",0],PARAMETER["scale_factor", .9996],UNIT["US_Foot",0.3048006096012192],AUTHORITY["EPSG","87973"]]

/*Again, deleting the 7973 and 96948 entries broke it again! Not only that, but restoring the old file was also broke! But rather than re-add, I renumbered 97973 to 87973 and it now works. I'm leaving the junk entries in there! */

I don't know what to make of it, but its in there now.

  • are your entries on a single line each or has a line break sneaked in somewhere - I think that will break the reader – Ian Turton May 29 '14 at 7:37
  • They are all on a single line. I only added line breaks above to improve the readability here. I have been very diligent about making sure that everything is on 1 line. – Aeopile May 29 '14 at 12:17
2

I believe there's already a projection named NAD_1983_HARN_UTM_Zone_18N (EPSG:3748) so it may be confused about your custom entry.

As an aside, I think the proper name of this projection would be NAD_1983_HARN_BLM_Zone_18N as the Bureau of Land Management (BLM) projection is defined exactly the same as UTM, except the UOM is in USFT rather than meters, which is what it looks like you are trying to define.

This removes some of the ambiguity out of the projection name, since I've seen way too many errors when someone swaps the UOM in a UTM projection.

  • I had the thought that my PROJCS name may be causing a problem, so I did attempt to change it. Unfortunately, this did not solve my problem. – Aeopile May 28 '14 at 22:33
  • Just read your above edit, and that is strange. The only time I've seen issues like that is mixing up Windows/Linux/Mac newlines. Can you make sure all your newlines match your destination OS? – Mintx May 29 '14 at 15:47
  • I'm using only Notepad for manipulating the epsg.properties file and have never opened the text file on a Linux or a Mac. I'm not sure how I would go about confirming only Windows OS newline characters. In fact, I don't have any new lines in the text file - I've made sure that each "entry" starts directly after the prior entry, on the same line. – Aeopile May 30 '14 at 12:32
  • 1
    I think each entry needs to be on a single line. And if you downloaded the geoserver entry from spatialreference.org, it ends in an Linux newline, which you wouldn't see in notepad. edit: Notepad++ is a great alternative to regular notepad -- notepad-plus-plus.org – Mintx May 30 '14 at 17:27
2

I needed to add another custom projection to my geoserver, and I decided to follow Mintx's advice and open the epsg.properties file with Notepad++. Doing this, I could see that there are indeed end-of-line characters that plain 'ol Notepad just doesn't see. I was able to very easily add my new projection as a straight up copy/paste. I can also see that I have no end-of-line characters at all on the line entries that were giving me trouble.

So, the answer to the question, and confirmed today, do not use notepad! Use notepad++.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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