Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to do this locally in Javascript without using an ArcGIS service. The ideas is to get census group block and block data under drive time polygon overlays. An example of how the drive time overlays are created is here

Create drive time polygon around a map point

I can use the polygon vertix coordinates in some script with local CSV or JSON data about census blocks to see if the are with these polygons.

Can someone provide some script that does this??

share|improve this question
    
You are still going to need the service to exist that will contain the Census Block data, once you identify the point in space within your drive-time-poly you will then need to intersect the census block data to get the proper values back. –  D.E.Wright Mar 30 '13 at 3:32
    
No I have all I need locally right down to block data. What I don't have is a way in script to get the drive time polygon vertices and a script to see if census block group or block coordinates fall within the polygons. –  mszlazak Mar 30 '13 at 15:53
    
gOverlays = mapExtension.addToMap(gpResults); –  mszlazak Mar 31 '13 at 21:23
    
gOverlays = mapExtension.addToMap(gpResults); var features = gpResults.results[0].value.features; Each item of features[] has polygon(s) of a drive time. More than one polygon with a drive time if it has "holes." The geometry[] holds these which gives you features[].geometry[]. Looks like geometry[] entries greater than zero are the holes. Then look at C[0] for property j which gives the coordinate pairs. features[0].geometry[0].C.0.j = (34.04386734217394, -117.3665526005604),(34.04350666262678, -117.36151044273623),(34.043983331816946, -117.3605780111053), ... –  mszlazak Mar 31 '13 at 21:41
    
alert(features[0].geometry[0].getBounds()); alert(features[0].geometry[0].getArea()); var vertexCount = features[0].geometry[0].getVertexCount(); coord = ""; for (var i=0; i<vertexCount; i++) { coord += features[0].geometry[0].getVertex(i); } alert(coord); –  mszlazak Mar 31 '13 at 22:39
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.