Question

Address to XY

  • 22 August 2018
  • 9 replies
  • 31 views

Badge

New user here - thanks in advance for the help! I'm trying to use Coordinate Extractor to populate XY from address but not having any luck. Any suggestions?

Thanks in advance.


9 replies

Userlevel 4
Badge +30

Hi @keb9113

Let me know if I did understand your case.

What Source do you have?

Could you share us you data?

Thanks,

Danilo

Badge

I have a csv file with ~1k records of combined address (addr+csz) and broken out address:

Orig Address City State Zip 10 Richmond Dr West Chester, OH 45069 10 Richmond Dr West Chester OH 10041 Bolingbroke Dr Cincinnati, OH 45241 10041 Bolingbroke Dr Cincinnati OH 10045 Windisch Rd West Chester, OH 45069 10045 Windisch Rd West Chester OH 10045 Windisch Rd West Chester, OH 45069 10045 Windisch Rd West Chester OH 10045 WINDISCH RD,West Chester,OH,45069 10045 WINDISCH RD West Chester OH 10085 Mosteller Ln West Chester, OH 45069 10085 Mosteller Ln West Chester OH 10099 DAYCREST DR,West Chester,OH,45069 10099 DAYCREST DR West Chester OH 10100 Windisch Rd West Chester, OH 45069 10100 Windisch Rd West Chester OH 10111 Cliffwood Ct Cincinnati, OH 45241 10111 Cliffwood Ct Cincinnati OH
Userlevel 2
Badge +12

Assuming you have point geometries, these are the correct settings for the CoordinateExtractor:

Userlevel 2
Badge +12

Assuming you have point geometries, these are the correct settings for the CoordinateExtractor:

And just now saw your new post. You have no geometries, so the CoordinateExtractor will not work.

 

Have a look at the GeoCoder transformer

 

 

Userlevel 4
Badge +30

I have a csv file with ~1k records of combined address (addr+csz) and broken out address:

Orig Address City State Zip 10 Richmond Dr West Chester, OH 45069 10 Richmond Dr West Chester OH 10041 Bolingbroke Dr Cincinnati, OH 45241 10041 Bolingbroke Dr Cincinnati OH 10045 Windisch Rd West Chester, OH 45069 10045 Windisch Rd West Chester OH 10045 Windisch Rd West Chester, OH 45069 10045 Windisch Rd West Chester OH 10045 WINDISCH RD,West Chester,OH,45069 10045 WINDISCH RD West Chester OH 10085 Mosteller Ln West Chester, OH 45069 10085 Mosteller Ln West Chester OH 10099 DAYCREST DR,West Chester,OH,45069 10099 DAYCREST DR West Chester OH 10100 Windisch Rd West Chester, OH 45069 10100 Windisch Rd West Chester OH 10111 Cliffwood Ct Cincinnati, OH 45241 10111 Cliffwood Ct Cincinnati OH
Thanks! Are you using the transformer Geocoder?

 

 

Badge +2

Hi @keb9113,

This article: https://knowledge.safe.com/articles/56486/converting-from-csv-data-2.html explains some different methods for converting CSV to spatial data.

Since your dataset is currently stored as an address feature it does not yet have any spatial geometry so you will not be able to use the Coordinate Extractor because this transformer requires existing spatial geometry and simply pulls the X and Y values out into attributes.

Instead as mentioned by @erik_jan and @danilo_fme you will need to use the Geocoder to convert each address into a point, which is method 3 in the linked article. You should be able to use your full address attribute with the mode set to 'Forward' and this will create a lat and long attribute for each address. There are a number of different Geocoding Services available which require different levels of authorization.

Badge +2

Hi @keb9113,

As @erik_jan mentioned, you'll want to use the Geocoder using the OpenStreetMap Geocoding Service in the Forward Mode - you can either set the Street Address parameter to the Orig attribute or build the address from multiple attribute values in the Text Editor.

Two things to note:

  1. The expected input address format varies between services. See the documentation provided by your chosen service for details.
  2. Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter. I would recommend using Continue Running as the Geocoder may fail some addresses due to invalid format.

I've attached a sample workspace that geocodes 5 addresses (4 successfully, 1 fails), and an attribute remover to get rid of unwanted attributes that are created by the Geocoder

I hope this information helps.

- Chris

geocoding.fmwt

Badge

I truly appreciate the help! I thought I had done something (else) wrong so I started from scratch.

I've pulled in another file that has lat/long populated (via geocoder) and tried the Coordinate Extractor; however, it populates X/Y with nan. Sorry, just not sure what I'm missing.

Userlevel 2
Badge +12

I truly appreciate the help! I thought I had done something (else) wrong so I started from scratch.

I've pulled in another file that has lat/long populated (via geocoder) and tried the Coordinate Extractor; however, it populates X/Y with nan. Sorry, just not sure what I'm missing.

CoordinateExtractor uses the geometry to extract coordinates into an attribute. If you have coordinates in an attribute and want a point geometry, You can use the VertexCreator transformer.

 

 

Reply