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

  • Home
  • SEARCH
  • 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 8862445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:43:51+00:00 2026-06-14T15:43:51+00:00

I have an Access 2010 database with information from Geonames. The table name is

  • 0

I have an Access 2010 database with information from Geonames. The table name is cities. For simplicity the columns are “name”, “latitude”, “longitude”, “loc”. I created “loc” to combine “longitude” and “latitude” into one field so that I can use MongoDB’s geospatial index. I had to save the “loc” column in string format since I am combining two decimal values with a comma in between.

When I export this table to a CSV I skip “longitude” and “latitude” since I have the new combined “loc” field.

The CSV looks like:

"geonameid", "name", "loc"
1, "Sweden", "18.068287,59.336341"

After I run MongoImport into “cities” collection, the loc field is embraced with quotation marks such as:

{ "_id" : ObjectId("50a9ed157db1bcfe22cddd0a"), "geonameid" : 20, "name" : "Sweden", "loc" : "18.068287,59.336341", }

From here I run a command to turn “loc” into an array. I use the following command thanks to another contributor here on Stackoverflow:

db.cities.find( { 'loc' : {$type : 2 } } ).forEach( function (x) { x.loc = new Array(x.loc); db.cities.save(x); });

The result is:

{ "_id" : ObjectId("50a9ed157db1bcfe22cddd0a"), "geonameid" : 20, "name" : "Sweden", "loc" : [ "18.068287,59.336341" ], }

How can I remove the quotation marks from my gps coordinates in the “loc” field? I can’t code in java and don’t mind waiting for MongoDB to perform this task. If it would work to export the CSV with the “longitude” and “latitude” fields and combine them into a new “loc” field in MongoDB I don’t mind that either even if it is not a beautiful solution. I just need to get the “loc” field working with the geospatial index.

  • 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-06-14T15:43:53+00:00Added an answer on June 14, 2026 at 3:43 pm

    You combined numbers into “loc” fild so now it’s a string and it’s being quoted. Separate it back to numbers before importing into MongoDB.

    But you need “loc” field to be an array to use it with GEOindex – and arrays aren’t possible with CSV. You need to find a way to export data from MS Access to JSON and then import JSON to MongoDB with “mongoimport --jsonArray” command

    Exporting Access to JSON – http://www.divconq.com/2010/export-a-microsoft-access-database-to-json/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database(Access 2010) with about 6 tables related to 1 master table,
I have a table in a MS Access 2010 Database and it can easily
I have a database in access 2010. A have a table that has some
I have a number of exported text fields from an old access database that
I have a Microsoft Access 2010 database(*). Now, using Visual Studio 2010, I want
I'm using Access 2010. I have a database with multiple tables, each containing different
I am working on my first Access 2010 database and have run into a
I have written an application in Delphi 2010 that imports data from one database
I am trying to Update a table in an access database from C#. It
I have an Access 2010 database that I want to split into two (front

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.