Geographic Location - Long/Lat

Old forum thread on working with longitude and latitude in SketchUp.

SnowTiger

9/23/09

I am fully aware that "providing one can see the location in GE" we can then download the terrain and would then already be Geo-

Referenced. However, where one cannot see the location due to poor imagery and/or clouds OR we aren't doing a Google Earth model and/or otherwise already have the Long/Lat coordinates for a building's location, is there any way to add this information Permanently to the List of Locations in Model Info ?

In other words, I have several locations within Ontario, Canada who's coordinates I would like to permanently add to the drop-down list of locations.

Is there any way to modify this list of locations ?

George Knowles

9/23/09

Hello SnowTiger,

In my recent work with the Geolocation settings, I did not come across an option to create new preset locations.

Sorry Snow …I just can’t resist posting the link to my opus.

Creating-Real-World-Shadows

Adding a preset location sounds like “under the hood” type work with a ruby script, which isn’t my realm. I’m still trying to master “Hello World!”

What if you created an individual Template for each location?

Best regards,

George Knowles

TaffGoch

9/23/09

Chris,

The default lon/lat data is stored (on the PC) in the file...

C:\Program Files\Google\Google SketchUp 6\Resources\en-US\locations.dat

C:\Program Files\Google\Google SketchUp 7\Resources\en-US\locations.dat

I had to add a few U.S. state capitols (imagine that, capitols don't necessarily rate as defaults!)

If you're on a Mac, someone else will have to point the way....

Taff

TaffGoch

9/23/09

BTW, I used Wordpad to add locations. (Notepad won't work -- don't try it!)

Taff

George Knowles

9/23/09

Hi SnowTiger,

Here’s another source for decent aerial/location images.

https://zoom.earth/ (redirect from the original link. Check out the base map. edit 9/2/21)

After opening the viewer, click through the different Map Sources in the upper left corner. Neave Flash Earth doesn’t have all the bells and whistles like GE, but the images come from various sources. Sometimes you get lucky and find a better image than in GE.

Best regards,

George Knowles

George Knowles

9/23/09

Taff,

>The default lon/lat data is stored (on the PC) in the file...

C:\Program Files\Google\Google SketchUp 6\Resources\en-US\locations.dat

C:\Program Files\Google\Google SketchUp 7\Resources\en-US\locations.dat

Wow, that’s great to learn!

Do you have any thoughts about how to change the Time Zone values displayed in the Set Custom Location dialog box?

I see some of the UTC offset values in the .dat file are fractional hours even though the dialog box displays them as whole hours. E.g., Delhi, India is correctly entered as UTC+5:30 in the .dat file, but is presented as UTC+5 in the dialog window. It’s sort of quirky the dialog box doesn’t reflect the actual value in the .dat file.

In addition, may I request privileges to add your wisdom to the SUWiki?

Geo

TaffGoch

9/23/09

I didn't think to look at fractional time zone values! It makes me wonder whether shadows are so affected, even though the "location" dialog doesn't show the fraction.

Feel free to add to the SUWiki, at your pleasure. It would be great if a Mac user could add to this discussion, regarding the name and location of the data file(s). Then you'd truly be all set for editing.

Taff

George Knowles

9/24/09

Hello Taff / Chris,

After some doodling around, I find:

Shadows and the Local Time of Sunrise/Sunset in the Shadow Settings dialog box respond nicely to fractional-hour adjustments made in the locations.dat file. For a new entry to take effect, one needs to switch to a different location amongst the preset choices and then back to refresh.

The 24-hour ±UTC menu/display field in the Set Custom Location dialog box simply does not reflect the fractional-hour entry in the .dat file, e.g. the pre-set location for Delhi, India.

It’s apparent that creating a custom pre-set location via an entry in the location.dat file is the “Enhanced Set Custom Location” method, enabling custom Geolocation and fractional-hour ±UTC settings.

The 24-hour ±UTC menu/display field in the Set Custom Location dialog box then remains effective as a 1-hour increment adjustment to accommodate Daylight Saving Time while the unseen fractional-hour ±UTC - offset entry in the location.dat file remains in effect.

Now “.dat’s” custom! :-)

Geo

TaffGoch

9/24/09

It's a shame that a custom location, set via the "Set Custom Location" dialog box feature, is not automatically added to the "location.dat" file.

Each time you want to set a location that is not in the "location.dat" file, you have to enter it in the "Set Custom Location" dialog. Users should note that any custom setting (made in the program) is not retained for subsequent use in new models. If you want a custom location to subsequently appear in the "defaults" listing, you have to edit the "location.dat" file. (This regards version 6. I haven't tested version 7, yet.)

___________

(We still haven't heard from a Mac user, regarding the data file name and location.)

Taff

SnowTiger

9/25/09

I thank you all kindly for this information. Geo - I greatly appreciate being provided with the file location and the knowledge that WordPad is the right program for editing. That in itself just saved me from wasting time as I would have likely tried NotePad to edit that file.

I guess I should consider adding to the Google SketchUp Wish List .. to have a function added that allows us to input custom locations for future use.

When I model for clients re: Architectural Design/Shadow Studies etc, my clients are from all over Ontario (and some outside Ontario), so having the ability to save the geographic location for future models would be helpful.

Once again, Many Thanks.

SnowTiger

9/25/09

Hi TaffGoch

Thanks for this information regarding the specific file that needs to be edited.

I apologize for giving Geo credit for this information. But Geo is also always good at providing useful information, such as the Flash Earth link.

Thanks to both of you and again, sorry for the confusion re: credits.

TaffGoch

9/25/09

No bruised ego, here, Chris!

Be sure to add to the SketchUp features wishlist, the ability to add locations via the "Set Custom Location" dialog.

(I'm still surprised that no Mac user has commented on the filename & path....)

George Knowles

9/28/09

Hi Taff & Chris,

As the old saying goes, “Be careful what you wish for.”

>Be sure to add to the SketchUp features wish list, the ability to add locations via the "Set Custom Location" dialog.

That would certainly be better than drilling down to the .dat file, provided you could actually see what is in the file from the GUI side.

As it works now, unless you peek in the locations.dat file, there really is no way to tell what the actual time zone setting is for a particular preset location.

The GUI doesn’t present the time zone setting unless you click the Set Custom Location button to check the TZ setting. That still doesn’t tell you the actual number in the .dat file being used for calculating shadow times. Moreover, the preset time in the .dat file may be a fractional hour yet the GUI only presents whole hours.

The bad part of the hidden TZ arrangement is that you’re essentially running blind. I’ve stumbled across two time presets in the .dat file that are incorrect, i.e. Caracas, Venezuela and Lanzhou, China.

Caracas is set at -4.00; it should be -4.50. Lanzhou is set at +7; is should be +8. It sticks out like a sore thumb when you look at the list in the .dat file and see +7 among the rest of the correct +8 China entries. Are there others … ?

Best regards,

Geo

TaffGoch

9/28/09

Hmmm, okay, add THAT to the wish list, too!

( By THAT, I mean "show me the data..." )

Colin Holgate

9/29/09

>

> (I'm still surprised that no Mac user has commented on the filename &

> path....)

I hadn't been following the thread, but for some reason I just became curious enough to look it over...

The way things work on Macs is that the application is really a package of files, more or less like a folder. You can see what is

inside by right-clicking (or control-clicking) on the application, and selecting Show Package Contents. Inside is usually a Contents folder, then a few other subfolders, one of which is called Resources.

So, to get the Mac locations.dat file, Show Package Contents for SketchUp, go into Contents, Resources, and locations.dat is inside the folder called English.lproj.

George Knowles

9/29/09

Hi Colin,

Thanks for the Mac info. Is there a particular application one uses to open the .dat file on a Mac?

Just to confirm, is this how you would express the path to locations.dat?

SketchUp 7 Show Package Contents > Contents > Resources > English.lproj > locations.dat

Thanks,

Geo

Colin Holgate

9/29/09

> Is there a particular application one uses to open the .dat file on a

> Mac?

>

That's a good question. .dat files can be several different things, including media files, and so on the Mac the file would naturally want to open in a media player. But it is just a text file, so the safe thing to do on a Mac, or Windows come to that, is to drag the locations.dat file onto your preferred text editor application, or open it from within the text editor.

> Just to confirm, is this how you would express the path to

> locations.dat?

>

> SketchUp 7 Show Package Contents > Contents > Resources >

> English.lproj > locations.dat

That's how I would express it, because there's a user action involved in showing the package contents. As far as Unix (don't forget that under the hood, Mac OS is Unix) is concerned the path is:

/Applications/Google\ SketchUp\ 7/SketchUp.app/Contents/Resources/English.lproj/locations.dat

George Knowles

9/29/09

Hey! Thanks Colin,

What’s the name of the text editor app. on the Mac? Isn’t there something like MS WordPad that comes with the Mac OS?

Geo

Colin Holgate

9/29/09

> What’s the name of the text editor app. on the Mac? Isn’t there

> something like MS WordPad that comes with the Mac OS?

Yes, TextEdit. It can either work as a plain text editor, or as a rich text editor. For the locations.dat file you would treat is as plain text.

George Knowles

9/29/09

Colin … most appreciated!

Thanks,

-Geo