0

I'm writing a little program (in c++, primarily) that will store optional information about the location of an object. Sort of like this:

class loc {
  private:
    double lat;
    double lon;
    string address;
}
class foo {
  private:
    string name;
    loc location;
}

I'm wondering what data format standards are extant that are relevant to the design of the "loc" class. I'm not, at this point, writing anything GIS or navigation related, but I would like to be able to handle and provide data to external libraries/programs with minimal complication. As such, finding some sort of standard for this type of data would be helpful.

I've seen some standards like the W3C API, but I'm not clear on how widely accepted that is. Is it acceptable to store only lat/lon and assume WGS84? Is it necessary to store the geodesy info as well?

Is it reasonable to have one class encompass both geodetic location and textual "address" information? Or is there a consensus that this should be separate?

1 Answer 1

0

I suggest you to go for Struct Address (Include more detailed information like street,House,City etc) for address, this way you can add much more details. If you are asking the user to input the address then it would be better approach.

Your approach is also fine as the level of details depends on the set of operation that you want to do. for example if you want to find the differences between altitudes of two points then you might have to add Altitude as data member.

At the end It depends on the requirement

P.S About the Geodesy doubt...the answer depends on the type of operation you want to use.

2
  • So, what I'm understanding is that there is no overriding standard, of which one can implement a subset as needed? That correct?
    – justinzane
    May 28, 2014 at 0:07
  • @justinzane There are lots of attributes that can be included for a geolocation but it totally depends on the requirements of the user. There is not standard for geolocation but certain set of attributes that might be used to define a geolocation. May 28, 2014 at 0:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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