You are here: > ESRI Forums > arcgis server forums > Thread Replies

ArcGIS Server Forums

ArcGIS API for Flex forum

Query on geocoding service   Frank M Feb 09, 2010
Re: Query on geocoding service   Robert Scheitlin Feb 09, 2010
Re: Query on geocoding service   Frank M Feb 10, 2010
Re: Query on geocoding service   Robert Scheitlin Feb 10, 2010
Re: Query on geocoding service   Frank M Feb 10, 2010
Re: Query on geocoding service   Robert Scheitlin Feb 10, 2010
Re: Query on geocoding service   Frank M Feb 10, 2010
Re: Query on geocoding service   Robert Scheitlin Feb 10, 2010
Re: Query on geocoding service   Frank M Feb 10, 2010
Re: Query on geocoding service   Robert Scheitlin Feb 10, 2010
Re: Query on geocoding service   Frank M Feb 10, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Query on geocoding service 
Author Frank M 
Date Feb 09, 2010 
Message Hi,
Here's the thing, I have a widget that gives the ability to the user to geocode a location (i.e. you enter a town and an address and it locates you) but I would like to reduce the error possibility coming from the user input fields.

In order to achieve this goal, I've made a text input field bound with an AutoCompleteManager for the city name.

Now I would like to make a query with the name of the city on my locator so that I could have a list of streets.

The first part works perfectly. However, when I make a query on my locator I get the following error : [RPC Fault faultString="" faultCode="400" faultDetail="Invalid URL"].

The thing is that this URL is valid since my locator uses it. What could be the problem?

Thank you. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Robert Scheitlin 
Date Feb 09, 2010 
Message Frank,

You can not query a locator service url You will have to query the Map Service that the locator is built from. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Frank M 
Date Feb 10, 2010 
Message Well, this was my first guess...

Any idea how I could do this without the map service associated to the locator. If I look at the REST services the server exposes there is nothing relevant(for what I try to do) other than the Geocoding service.

I can sse what fields are 'exposed' on the service, is there any way to access them. I actually only use 2 of them (Address and City) but there are a lot more like StreetName and StreetType. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Robert Scheitlin 
Date Feb 10, 2010 
Message Frank,

So it sounds like the locator service is not yours then right? The likelihood is that the locator service is for the whole US and it is going to be nearly impossible to accomplish what you are trying to do. Think about the thousands of cities that are in the US and then the 100s of thousands of addresses. I just can not think of an efficient way to do this without accessing the the original data that the locator was built from. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Frank M 
Date Feb 10, 2010 
Message Hi Robert,
Actually, the service do belong to us, but the thing is that I'm a cs engineer and it's not under 'my' responsability. I just wanted to make sure that there is no other way to do what I have in mind.

Let me clarify things here so that we don't get confused. There is a lot of streets in the US, but take a look at what I do.

1. For now, I restrict the search to only 1 state so it's kind of easier, let's say New York (you'll soon see that we could easily expand this to the whole country).
2. In the whole New York state there is plenty of towns so when a user enter letters in the textinput, I wait that there is 3 characters in it(this also reduce the load on the server so that he doesn't have to query for 500 entries and no need to change basic configuration to allow more than 500 search result ;)). Then I do a query on one of the MapService we have here. With this query I populate an array of strings with city names.

At this point I already have way less possible results for a street.

I would like then to query for a street name using the same method I did for the city name. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Robert Scheitlin 
Date Feb 10, 2010 
Message Frank,

OK I see where you are going with this. If you do not have an Autocomplete component yet than look at Yahoo's AutoCompleteManager: http://developer.yahoo.com/flash/astra-flex/autocompletemanager/ 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Frank M 
Date Feb 10, 2010 
Message Thank you, but that's already what I'm using. I try to populate the target field from the AutoCompleteManager directly from data from the ArcGIS services.

It works fine with States and Cities, but I can't get the streets for a definite towns, that's why I was wondering if I could query on the geocoding service.

Do you see any solutions other than having to expose another map service? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Robert Scheitlin 
Date Feb 10, 2010 
Message Frank,

Thinking about my own current locator service that is a geocoded road centerline feature class, it has an address, city, state, zip, house number, etc. I would be able to query that feactureclass with the city and get a return of streets. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Frank M 
Date Feb 10, 2010 
Message Could you give me more detail on your geocoded locator and how you would do this? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Robert Scheitlin 
Date Feb 10, 2010 
Message Frank,

It has very little to do with the locator. What you would have to do if you do not already have a map service published for the featureclass that you locator was built from, then you would publish one. So in my scenario I have a polyline featureclass that is my geocoded road centerlines, I would just run a simple query task against that map service specifying in the where statement that CITY = 'ANNISTON' and specify the returned fields would be RD_NAME, PREFIX, SUFFIX. This would get me a list of street name that I could populate. I do not know of a way to get specific address back though. The way most common locators like mine work is that the line segment has an address range left and right addresses to and from and you could enter any number that falls in that range and you would get a returned XY even if there is actually no residence there because it is based on distance along the road and not actual physical addresses. 
  Robert Scheitlin
GIS Manager
Calhoun County, Alabama 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Query on geocoding service 
Author Frank M 
Date Feb 10, 2010 
Message Yea, well looks like I'll have to get a new Map service running.

Thank you.