Tehran, Iran – Visa extension, Uzbekistan and Turkmenistan visas

April 30th, 2012

After experiencing the whole nightmare of Visas in Tehran, Iran, here is a little guide on getting these key items completed as stress-free as possible;

Visa extension

We extended our 10 day visa an extra 20 days, obviously when getting the Letter of Invitation (LOI) it is better to add additional days just in case it is needed, add additional common cities to the itinerary, even if you don’t plan on visiting them. Nobody ever checked our itinerary, I don’t even think there is a way to check it.

Secondly, if you do need to extend your visa, it isn’t recommended to do it in Tehran, from what I have read it is a lot easier to do it in any of the touristy cities, Shiraz, Yazd or Esfahan. Tehran is extremely crowded with Afghani and Turkmens sorting out their visas.

Now if it comes to extending in Tehran, it should take one day, and it may even take the same day, if you are unlucky like us, and go after Nuorez (the Persian New Year holiday), try four to five days.

The visa extension office has three rooms, on entrance;

  • the first room on the right is for photocopies, passport photos, and bag/phone storage and body-search for females,
  • the second room on the right is the bag/phone storage and body-search for males, and
  • the main room on the left is for form collection, initial form screening and form submission.

The steps are very straight forward;

  • Purchase the two copies of paper work for about 1000 Rial each, they may even ask you to photocopy one form yourself, if they do, fill it in first.
  • Photocopy your Iran visa (the Iran visa needs to have the entry date visible) and photo copy your passport both of these twice.
  • Purchase passport photos if needed (40,000 Rial), important, women must be wearing a headscarf in the photos.
  • Pay 300,000 Rial at the Melli bank located walking distance, important, this bank does not change USD.
  • Once you have all of the above items, take them to the initial form screener at the entrance to the main room, he will let you know if everything is okay, staple it all, and then direct you to the next window (window 5 in our case).
  • At the next window you will be directed to speak to the senior approver, he simply confirmed the number of days extension and signed the forms. I am guessing he may ask another questions related to the extension.
  • Take the signed form back to the window and submit it, if it is not very busy you may be asked to wait while it is processed, for us we were given a ticket and asked to come back in five days.
  • Collect the passport after the required waiting period, important, it doesn’t look like you can collect on behalf of someone else, we watched a man get rejected trying to collect his wife’s, even though he had the ticket.
  1. Visa extension office (N35 43.519 E51 26.754)
  2. Approximate location of Melli bank (N35 43.547 E51 26.636)

Uzbekistan Visa

This is as straight forward as it gets. Make sure you have organised a Letter of Invitation (LOI) previously and have the reference number. We used StanTours who were extremely easy to use.

Note there is an Uzbekistan Embassy and Uzbekistan Consulate in Tehran, all given addresses are usually the Uzbekistan Embassy, but you need to go to the Uzbekistan Consulate.

Opening times are 9:30am to 11:30am, but if there is a long queue, it will stay open till everyone is finished processing, we arrived at about 11am and it stayed open till 12pm.

Items you need;

  • Two passport copies
  • Two completed Uzbekistan visa application forms,
  • Two passport photos,
  • Your passport,
  • $60 USD,
  • A copy of the LOI reference number (optional, but recommended)

On arrival press the third button on the intercom and let the person know you are here for a visa, the first thing they will ask is if you have an LOI. They will open the gate and let you through, or if there is a queue ask you to wait, make sure you workout who is at the end of the queue and make any people arriving after aware of your queue position.

The embassy does not do photocopying, photocopying is sometimes available in the street newsstands and should cost 1000 Rial.

  1. Uzbekistan Consulate (N35 48.267 E51 28.534)

Turkmenistan Transit Visa

The most frustrating visa to obtain. It takes five days to complete, but they do not take your passport, if you hand it in on Sunday, it will be available the following Sunday, not Thursday.

There are two parts, and I would strongly recommending doing it this way,

  1. Apply for authorisation in Tehran,
  2. Collect transit visa in Mashhad five days later.

The reason is, nobody wants to be stuck in Tehran (or Mashhad) for five days, you will also most likely use the border crossing near Mashhad. Once submitted in Tehran, follow the Caspian sea for five days, Dizin for skiing, Gorgon for amazing forests before reaching Mashhad to collect the visa and onwards travel to Turkmenistan.

Apply for authorisation in Tehran

Items you need;

  • Uzbekistan visa photocopy
  • Iran visa photocopy (the entry date stamp does seem to be a requirement)
  • Passport visa photocopy

Again photocopying is not available.

Arrive at the Turkmenistan embassy Tehran, as early as possible, opening time is 9:30am to 11:30am, but they may open earlier. Submit the paperwork and inform them you want express service, pickup from Mashhad and confirm when it will be available.

  1. Turkmenistan Embassy Tehran (N35 48.269 E51 27.148)

Collect transit visa in Mashhad five days later.

In Mashhad you will need to arrange the visa application, for 20,000 a photocopying shop will fill in the form, make photocopies of your passport, if needed take passport photos (for an additional cost) and staple is all together. They say an Uzbekistan photocopy is not required, which makes sense as they should have the details when you submitted it in Tehran, but it doesn’t hurt to take it.

Arrive at the Turkmenistan embassy in Mashhad as early as possible, whilst it opens from 9:00am to 11:30am, a line can start as early as 8:00am. Submit $55 USD in pristine notes, the form and your passport, and with any luck you shall receive the transit visa there and then.

Note you can chose between the either the Bajgiran-Ashgabat or Sarakhs-Saraghs entry, but you will always receive the Farab-Karakul exit.

  1. Turkmenistan Embassy Mashhad (N36 17.049 E59 35.958)
  2. Approximate location of copy shop for forms (N36 17.056 E59 35.875)

Good luck!

Free GPS maps for Garmin MapSource

March 22nd, 2012

I discovered this amazing service the other day, I was aware of the OpenStreetMap project, user contributed global street maps, but I was unaware of the additional service garmin.openstreetmap.nl which allowed you to download maps to be used on Garmin devices, including MapSource. Whilst Garmin produces some very comprehensive country maps, they miss some of the rarer countries, which OpenStreetMap have covered.

Central Asia free Garmin MapSource map

Related posts:

  1. How to Unlock Garmin maps

Triplex Development – Zoning

March 12th, 2012

In the last post I introduced my planned triplex development, I skipped over something, why specifically a triplex development?

This comes down to zoning, zoning is one part of the general council’s land use Planning Scheme, in simple terms, zoning determines the minimum land size a dwelling must reside on.

My land is zoned R20/R40, depending on what specific additional requirements are met for each.

Lets use R40, as this allows for more dwellings, to calculate the minimum land size;

1hector /40 = 10000m2/40 =  250m2

Therefore, each dwelling needs to sit on a minimum 250m2 of land.

My land is 911m2, so to determine the number of dwellings;

911/250 = 3.644 dwellings

hence a triplex development.

Related posts:

  1. Triplex Development – Introduction

Remove blank PDF pages with A-PDF Scan Optimizer

March 3rd, 2012

Recently I posted about A-PDF Page Cut, which was able to split PDF pages in half, it turns out that once you do this you get a lot of blank pages (not nice for your Kindle). Conveniently, produced by the same company is A-PDF Scan Optimizer which removes these blank pages. A-PDF Scan Optimizer does have a number of other features tailored to page scanning documents, included de-skewing, and rescaling, but I was only interested in the blank page removal feature.

To remove blank pages of a non-scanned PDF, Scan Optimizer is very straight forward to use, but if you have scanned PDFs which may have some grey shades on the blank pages, it may require a bit of tweaking to get right.

A-PDF Scan Optimizer startup interface

Once you have “Turned On” the Delete Blank Pages option click Settings to bring up the options.

A-PDF Scan Optimizer delete blank settings

Though the help is non-existent for the Delete Blank Pages settings, there are two main settings to change and these are used to determine if a page is considered blank;

  • Black\white value – grey scale images have 256 shades of grey (0 being black and 255 being white), this setting sets the threshold to determine what should be black and what should be white, a setting of 128 means half the greys shades are white and half are black. If there are slight grey shades on your blank pages, this should be set so that you can no longer see them on the preview.
  • Threshold value – now that the image is black and white only, what is the faction of acceptable black on the page to still consider the page blank. This is useful if there are black specs on the pages. A value of 0.001 means 0.1% of the page can have black on it and still be considered blank. Set this high enough so that you get a result of “blank”.

Since my PDFs all originated from a digital source, I set them to the extreme settings of 255 and 0.00001. Click Optimize and Save As, the Scan Optimizer will batch process the list of PDFs and log which pages were deleted.

Related posts:

  1. Review of A-PDF Page Cut – software to split a pdf page in half
  2. WordPress hacked – broken or blank refreshing admin/dashboard

Triplex Development – Introduction

March 3rd, 2012

A few years ago together with the misses, we bought an old house sitting on a decent parcel of land, enough to build three houses when the time came. You can further read about the purchase on our joint blog sonyaandtravis.com, “Buying a house and making a home”.

Well the time has now come to start developing, as a first time developer and builder, there will be a lot of learning and experiences which I will document and share, and hopefully it will be useful for others in the same situation.

Some information on the land;

  • 3×1 double brick house
  • Land area 911 metres squared
  • Approximately 18 x 50.3 metres
  • Zoned R20/R40
  • Purchased for $500k

Cloverdale lot diagram and zoning

Related posts:

  1. Correspondence with Property Manager LJ Hooker Belmont WA – Introduction

Correspondence with Property Manager LJ Hooker Belmont WA – Tenant in Rent Arrears

March 2nd, 2012

On 1st October LJ Hooker Belmont WA informs we that the tenant had not paid rent for 2 weeks,

“the tenant has only paid to the 16/09 and has been breached and I spoke to him and he is coming in on Tuesday and Wednesday to pay the backlog.”

I asked about when a Breach Notice for Non-Payment of Rent was issued and LJ Hooker Belmont WA seemed to suggest that it has just been that day (possibly after I asked about it). There is an additional 17 days that must be waited prior to termination (two weeks plus few days for breach delivery in the mail), this meant that the breach expired on the 17th October, the two week delay in issuing the breach by LJ Hooker Belmont WA meant that I had to wait 1 month before even issuing a Termination for Non-Payment of Rent, and if the tenant refuses to leave, a court case can take another 10 to 14 days (quoted from LJ Hooker Belmont WA). Now don’t forget the bond only covers 4 weeks of rent.

On Saturday 1st October, LJ Hooker Belmont WA informs me;

“I spoke to him and he is coming in on Tuesday and Wednesday [4th and 5th October] to pay the backlog [$680]”

On Thursday 6th October I receive an email;

“Your tenant has paid rent $550 today… and is now $310 in arrears.”

On Friday 7th October I receive another email;

“He has assured me he will pay $400 on Wednesday [12th October] and $400 each week until he has caught up again.”

On Friday 14th October I receive another email;

“The tenant paid $250 today and paying $740 on Wednesday and this will take him upto [sic] the 21 October. “

On 18th October Termination for Non-Payment of Rent is issued by LJ Hooker Belmont WA, the tenant has till the 27th October to vacate.

On 27th October LJ Hooker Belmont WA informs me that Jacaranda Community Centre has approved payment of the tenant’s rent arrears.

On the 4th November LJ Hooker Belmont WA that the tenant has paid all rent arrears and is up to date with payments.

Now this was one of the added advantages of having a Property Manager, they know who to contact, Jacaranda Community Centre is a community service centre for the City of Belmont who assist with people in financial hardship, and in this case they paid all rent arrears and brought the tenant up to date with payments.

I also decided to take up Landlord Insurance, which LJ Hooker Belmont WA advised from the very start to do, I went with AMA Insurance, for about $150 a year you are covered for about $17,000 of lost rent, not bad at all.

Related posts:

  1. Correspondence with Property Manager LJ Hooker Belmont WA – Tenant Maintenance
  2. Correspondence with Property Manager LJ Hooker Belmont WA – First Tenants
  3. Correspondence with Property Manager LJ Hooker Belmont WA – The Hidden Charges
  4. Correspondence with Property Manager LJ Hooker Belmont WA – Introduction
  5. Correspondence with Property Manager LJ Hooker Belmont WA – Dogs, Stickers and Powerpoints

SplitExtended – improved VB split function with group characters

March 2nd, 2012

Based on SplitEx by Chip Pearson, SplitExtended is optimised to be over double the speed, with fixes and additional features;

Features over the standard VB Split are;

  • grouping characters, no longer split strings in quotes,
  • ignore consecutive delimiters, while preserving those in  grouping characters,
  • option to remove grouping characters, start and end quotes can be removed, and
  • double grouping characters inside a grouping character is converted to single grouping characters, double quotes inside quotes are converted to single quotes.

Download modSplitExtended.bas

Code here;

Option Explicit

'====================================================================================
' SplitExtended
' By Travis Hydzik
'
' Based on SplitEx by Chip Pearson http://www.cpearson.com/Excel/Split.aspx
'
' Improvements include;
' - over double the speed of SplitEx
' - doesn't remove double Delimiters in groups
' - double GroupChar in groups treated as escaped and converted to single
'====================================================================================
Public Function SplitExtended(ByRef InString As String, _
    ByVal Delimiter As String, _
    Optional ByVal GroupChar As String = vbNullString, _
    Optional ByVal IgnoreConsecutiveDelimiters As Boolean = False, _
    Optional ByVal DeleteGroupCharacters As Boolean = False) As String()

    Dim arr() As String

    Dim InGroupReplace As String
    Dim consectGroupReplace As String

    Dim S As String

    S = InString
    Dim i As Long, j As Long

    If LenB(S) = 0 Then
        'string is empty so return an unbound array (similar to original Split)
    ElseIf LenB(Delimiter) = 0 Then
        'Delimiter is empty so return an array with the first element the string
        ReDim arr(0)
        arr(0) = S
    ElseIf InStrB(1, S, Delimiter, vbBinaryCompare) = 0 Then
        'Delimiter is not found in the string, return an array with the first element of the string
        ReDim arr(0)
        arr(0) = S
    Else

        'find a unique character in string s, that isn't the Delimiter
        'it can be unique AND the group character as this means there won't be any grouping
        i = -1
        Do While LenB(InGroupReplace) = 0
            i = i + 1
            'the character is unique
            If InStrB(1, S, ChrW$(i), vbBinaryCompare) = 0 Then
                'the character is not the delimiter
                If StrComp(ChrW$(i), Delimiter, vbBinaryCompare) <> 0 Then
                    InGroupReplace = ChrW$(i)
                End If
            End If
        Loop

        'if DeleteGroupCharacters is enabled, it is common to double the GroupChar if that character is needed
        'replace all consecutive group characters with consectGroupReplace
        If DeleteGroupCharacters Then
            'only if there are consecutive GroupChar
            If InStrB(1, S, GroupChar & GroupChar, vbBinaryCompare) > 0 Then
                'find a unique character in string s, that isn't the Delimiter and isn't inGroupReplace
                Do While LenB(consectGroupReplace) = 0
                    i = i + 1
                    'the character is unique
                    If InStrB(1, S, ChrW$(i), vbBinaryCompare) = 0 Then
                        'the character is not the delimiter
                        If StrComp(ChrW$(i), Delimiter, vbBinaryCompare) <> 0 Then
                            'the character is not the GroupChar
                            If StrComp(ChrW$(i), GroupChar, vbBinaryCompare) <> 0 Then
                                consectGroupReplace = ChrW$(i)
                            End If
                        End If
                    End If
                Loop

                'once the character is found, replace all double GroupChar
                S = Replace(S, GroupChar & GroupChar, consectGroupReplace, 1, -1)
            End If
        End If

        'replace any Delimiter occuring in a group with inGroupReplace
        i = InStr(1, S, GroupChar, vbBinaryCompare)
        j = InStr(i + Len(GroupChar), S, GroupChar, vbBinaryCompare)
        Do While i > 0 And j > 0
            If j > i Then
                'mid$(s, 1, i) = Replace(mid$(s, 1, i), Delimiter, inGroupReplace, 1, -1, vbBinaryCompare)
                'mid$(s, j) = Replace(mid$(s, j), Delimiter, inGroupReplace, 1, -1, vbBinaryCompare)
                Mid$(S, i, j - i) = Replace(Mid$(S, i, j - i), Delimiter, InGroupReplace, 1, -1, vbBinaryCompare)
            Else
                S = Replace(S, Delimiter, InGroupReplace, 1, -1, vbBinaryCompare)
            End If

            i = InStr(j + Len(GroupChar), S, GroupChar, vbBinaryCompare)
            j = InStr(i + Len(GroupChar), S, GroupChar, vbBinaryCompare)
        Loop

        'remove any consecutive delimiters, iteratively
        If IgnoreConsecutiveDelimiters Then
            Do While InStrB(1, S, Delimiter & Delimiter, vbBinaryCompare) > 0
                S = Replace(S, Delimiter & Delimiter, Delimiter, 1, -1, vbBinaryCompare)
            Loop
        End If

        'perform the split
        arr = Split(S, Delimiter, -1, vbBinaryCompare)

        'loop through the array and restore the special characters
        For i = 0 To UBound(arr)
            If InStrB(1, arr(i), InGroupReplace, vbBinaryCompare) > 0 Then
                arr(i) = Replace(arr(i), InGroupReplace, Delimiter, 1, -1, vbBinaryCompare)
            End If
            If DeleteGroupCharacters Then
                If InStrB(1, arr(i), GroupChar, vbBinaryCompare) > 0 Then
                    arr(i) = Replace(arr(i), GroupChar, vbNullString, 1, -1, vbBinaryCompare)
                End If
                If InStrB(1, arr(i), consectGroupReplace, vbBinaryCompare) > 0 Then
                    arr(i) = Replace(arr(i), consectGroupReplace, GroupChar, 1, -1, vbBinaryCompare)
                End If
            End If
        Next i
    End If

    SplitExtended = arr

End Function

Related posts:

  1. Visual Basic 6 – quickest way to find first/last character in string
  2. Longest Common Subsequence implemented in VBA (Visual Basic for Applications)
  3. Generic file selection window function in VBA
  4. Decimal to Binary functions in Visual Basic
  5. Review of A-PDF Page Cut – software to split a pdf page in half

Review of A-PDF Page Cut – software to split a pdf page in half

February 17th, 2012

I came into the requirement of needing to split the  pages of a pdf in half, normally this is required when you scan a book and have two pages per scan, but my specific example was a Lonely Planet digital publication which for some reason was  released similarly, as I wanted to view it on a Kindle I required single pages only.

My first trial was free software Briss, Java coded cross-platform, I did not find it intuitive at all and couldn’t get it to work, there was no way to select exactly half of the sheet, and no batch functionality.

I then moved to Page Cut by A-PDF, A-PDF have an interesting offer called “Blog it and get it” where you blog about the software and they give you a free license, hence this post, hopefully it pulls through.

Page Cut is extremely easy to use, the steps to split a page in half are;

  1. Open pdf with Page Cut
  2. Click Add a Vertical Line from the toolbar
  3. Click Apply with default settings
  4. Click Cut and Save As

That’s it you have a single page per page pdf.

Cutting a single pdf pages in half

Batch Cut Mode is even easier;

  1. Import pdf  with Page Cut
  2. Select Cut Vertical In Half
  3. Click Cut and Save As

Batch cutting multiple pdf pages in half

So what is Page Cut missing?

I would like to see some smarts; mainly for batch cuts, warnings if cuts go through words (or there isn’t enough blank white space).

The other thing needed is a column showing if the pdf is Landscape or Portait, with the option to select/deselect either. In general a landscape page will have two pages per page, a portrait page can be ignored.

As I needed this functionality, I wrote a little VB function that finds the page orientation, it does require Acrobat though. I could then filter and move to a separate folder landscape orientated pdfs to be imported into Page Cut, here’s the code;

Public Function getOrientation(ByRef gPDFPath As String) As String
    If LenB(gPDFPath) > 0 Then
        Dim acroApp, avDoc, pdDoc, pdPage
        Dim acroPoint
        Dim x As Long, y As Long

        Set acroApp = CreateObject("AcroExch.App")
        If acroApp.GetNumAVDocs = 0 Then 'no existing files
            acroApp.Hide
        End If
        Set avDoc = CreateObject("AcroExch.AVDoc")
        If avDoc.Open(gPDFPath, "Accessing PDF's") Then
            If Not avDoc.IsValid Then
                getOrientation = "Error"
                Exit Function
            End If

            Set pdDoc = avDoc.GetPDDoc()
            Set pdPage = avDoc.GetPDDoc.AcquirePage(0) 'first page

            Set acroPoint = pdPage.GetSize()
            x = acroPoint.x
            y = acroPoint.y
            Set acroPoint = Nothing

            If x >= y Then
                getOrientation = "Landscape"
            Else
                getOrientation = "Portrait"
            End If
        End If
        pdDoc.Close
        avDoc.Close True
'        If acroApp.GetNumAVDocs > 0 Then
'            acroApp.CloseAllDocs
'        End If
        acroApp.Exit
        Set acroApp = Nothing
        Set avDoc = Nothing
        Set pdDoc = Nothing
        Set pdPage = Nothing
    End If
End Function

Finally, on my search for the above functionality I tried A-PDF Explorer, what I noticed was a second folder in my Program Files and Start menu, given A-PDF make a large amount of tools, why not have a root folder A-PDF, with subfolders for each product, makes more sense.

Related posts:

  1. Generic file selection window function in VBA
  2. Rigid file manipulation functions for VBA/VBS
  3. VB6/VBA functions to convert binary string to Base64 string
  4. Word Minimize/Maximize event capture VBA
  5. Photoshop VBScript to automatically resize images