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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:47:43+00:00 2026-05-16T23:47:43+00:00

I am currently using Shapefile class and ColdFusion to go through the records of

  • 0

I am currently using Shapefile class and ColdFusion to go through the “records” of each shapefile. Each record has a bounding box and i am able to get this information but havent found a way to actually retrieve the points inside each record.

Can someone shed some light on which classes to use and how to use them?

This is the exact same situation(including some verbage) as:

http://old.nabble.com/what-class-do-you-use-to-extract-data-from-.SHP-files–td20208204.html

Allthough I am using ColdFusion, I do believe that any hints to the solution would help me greatly.

My current test code is as follows:

<cfset shapeFile = createObject("java","com.bbn.openmap.layer.shape.ShapeFile")>

<cfset shapeFile.init('/www/_Dev/tl_2009_25_place.shp')>

<cfoutput>
 getFileLength = #shapeFile.getFileLength()#<br>
 getFileVersion = #shapeFile.getFileVersion()#<br>
 getShapeType = #shapeFile.getShapeType()#<br>
 toString = #shapeFile.toString()#<br>
</cfoutput>
<cfdump var="#shapeFile#"> 
<cfdump var="#shapeFile.getBoundingBox()#"> <br>
<cfdump var="#shapeFile.getNextRecord()#"> 
  • 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-05-16T23:47:43+00:00Added an answer on May 16, 2026 at 11:47 pm

    I’ve never used this, or done any GIS, but after looking at the API, here’s my suggestion.

    So, after you have your shapefile, you would:

    myESRIRecord = shapeFile.getNextRecord();
    

    This gets you an ESRIRecord class or one of its subclasses, depending on what type of shape it is.

    The shapefile I’ve messed with to figure this out is:

    http://russnelson.com/india.zip

    And only contains polygon types.

    The ESRIPolygonRecord contains a property called “polygons” which contains an array of com.bbn.openmap.layer.shape.ESRIPoly$ESRIFloatPoly instances.

    The key with this library, it seems, is that a lot of the data is in properties, not accessible through methods.

    So, as I said, the ESRIPolygonRecords has its data in the polygons property, the ESRIPointRecord has its data in the x and y properties. So, if you were looking for a getX() or getY(), thats why you didn’t find it.

    This sample code worked for me:

    <cfset shapeFile = createObject("java","com.bbn.openmap.layer.shape.ShapeFile")>
    
    <cfset shapeFile.init('/tmp/india-12-05.shp')>
    
    <!--- There may be more then one record, so you can repeat this, or loop to get
          more records --->
    <cfset myRecord = shapeFile.getNextRecord()>
    
    <!--- Get the polygons that make up this record --->
    <cfset foo = myRecord.polygons>
    
    <cfdump var="#foo#">
    
    <cfloop array="#foo#" index="thispoly">
    <cfoutput>
        This poly has #thisPoly.nPoints# points:<br>
        <!--- because java arrays are 0 based --->
        <cfset loopEnd = thisPoly.nPoints-1>
        <cfloop from="0" to="#loopEnd#" index="i">
            X: #thisPoly.getX(i)#   Y: #thisPoly.getY(i)#<br>
        </cfloop>
        <!--- Returns points as array --->
        <cfdump var="#thisPoly.getDecimalDegrees()#">
        <cfdump var="#thisPoly.getRadians()#">
    </cfoutput>
    </cfloop>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently using ColdFusion 8 enterprise on 32 bit linux box to send out our
currently using jq 1.4.2 And i have gone through this forum and other forums
I'm currently using DPack as this adds a Collapse All Projects option to the
Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted
I am currently using the following query to get some numbers: SELECT gid, count(gid),
I am currently using this code to input data from numerous files into R:
I am currently using this code, but does not list anything. What I'm missing?
Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather

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.