Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6876795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:31:19+00:00 2026-05-27T04:31:19+00:00

Trying to generate a UUID based on an 6.6 XY coordinate pair and the

  • 0

Trying to generate a UUID based on an 6.6 XY coordinate pair and the date. However I am giving the function a ‘badly formed hexadecimal UUID string’. Python noob plz help.

def LeID(Xv,Yv,Dv):
    import uuid
    import string
    import arcpy
    X_val = "%.6f" % Xv
    Y_val  = "%.6f" % Yv
    date = Dv
    xarr = string.split(X_val, '.')
    yarr = string.split(Y_val, '.')
    date = string.split(date , '/')
    val =  str(xarr[0] + xarr[1] + yarr[0] + yarr[1] + date[0]  + date[1] + date[2] )
    return '{' + str(uuid.UUID(val).time_low()) + '}'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:31:20+00:00Added an answer on May 27, 2026 at 4:31 am

    It won’t work the way you think.

    There are several types of UUID: based on time (UUID1), randomly (UUID4) or based on another UUID plus data, put together via MD5 (UUID3) or SHA1 (UUID5).

    So you would take one previously defined UUID, maybe UUID('f82aa75f-56a8-442b-89d2-eb7aaae6f9c3'), as a namespace and derive all from this.

    def LeID(Xv,Yv,Dv):
        import uuid
        import string
        import arcpy
        MyNS = uuid.UUID('f82aa75f-56a8-442b-89d2-eb7aaae6f9c3')
        X_val = "%.6f" % Xv
        Y_val  = "%.6f" % Yv
        date = Dv
        xarr = string.split(X_val, '.')
        yarr = string.split(Y_val, '.')
        date = string.split(date , '/')
        val =  str(xarr[0] + xarr[1] + yarr[0] + yarr[1] + date[0]  + date[1] + date[2] )
        print MyNS, repr(val) # for debugging
        return '{' + str(uuid.uuid5(MyNS, val)) + '}'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running PostgreSQL 8.4.4 with Ubuntu 10.04. I am trying to generate uuid
Trying to generate db driven menu which based on parent->child structure. All root menu
I trying to generate an input (type=button) and setting the onclick-Event to a function,
I'm trying to generate customized xml files from a template xml file in python.
I am using a javascript function to generate a random string: function S4() {
Im trying to generate days of the current month like this $year = date('Y');
Trying to generate JavaDocs for the Android lint-cli project on Mac 10.7 Keep getting
Im trying to generate a color gradient using ColdFusion. My current code below works
I trying to generate an XML document which is around 23 to 30 MB,
I'm trying to generate a report of the activities that users have done within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.