Fishnet overlaid on shapefile centroids with PythonCoordinates of upper left corner in the world file?Divide...

15% tax on $7.5k earnings. Is that right?

Can I say "fingers" when referring to toes?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

Temporarily disable WLAN internet access for children, but allow it for adults

Keeping a ball lost forever

Unexpected behavior of the procedure `Area` on the object 'Polygon'

What are the advantages of simplicial model categories over non-simplicial ones?

Invalid date error by date command

Why does the Sun have different day lengths, but not the gas giants?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Biological Blimps: Propulsion

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?

Redundant comparison & "if" before assignment

How much character growth crosses the line into breaking the character

Is there a RAID 0 Equivalent for RAM?

Does IPv6 have similar concept of network mask?

Terse Method to Swap Lowest for Highest?

Has any country ever had 2 former presidents in jail simultaneously?

Is there an injective, monotonically increasing, strictly concave function from the reals, to the reals?

PTIJ: Haman's bad computer

Can disgust be a key component of horror?

Yosemite Fire Rings - What to Expect?

What exact color does ozone gas have?



Fishnet overlaid on shapefile centroids with Python


Coordinates of upper left corner in the world file?Divide a complex shapefile into a gridGenerating Map Tiles for MGRS Grid Graticule?Creating square grid polygon shapefile with Python?Creating fishnet grid Shapefile in QGIS?Create Fishnet with row iterator (in python) - Number of rows and columns not sufficient?Fishnet in MapInfoCan I overlay a population raster with fishnet shapefile?Create a grid from a shapefileBuilding fishnet using polygon feature class as center of fishnet?













0















I have an interesting problem and I'm not sure how to approach it.



I am a newcomer to the GIS world so I'm not 100% confident with the terminology, but I am trying to overlay a grid (fishnet/raster?) over top of a set centroids that I have calculated from the polygons in a given shapefile.



Such that each space in the grid contains exactly one centroid.



I'm not sure if there are any standard methods or theories to accomplish this so I'm just looking for a pointer in the right direction.



Additionally, the code I have been developing is in Python so I would like to stick to that environment.










share|improve this question

























  • Do you have the grid already? QGIS has 'gui' tools for this...

    – DPSSpatial
    6 hours ago











  • Usually the polygon is overlaid with the fishnet (vector) or grid (raster). If you just have a centroid, the fishnet can be virtual, with the resulting polygons generated on the fly. The complicating factor is the definition of centroid which varies by meaning.

    – Vince
    5 hours ago


















0















I have an interesting problem and I'm not sure how to approach it.



I am a newcomer to the GIS world so I'm not 100% confident with the terminology, but I am trying to overlay a grid (fishnet/raster?) over top of a set centroids that I have calculated from the polygons in a given shapefile.



Such that each space in the grid contains exactly one centroid.



I'm not sure if there are any standard methods or theories to accomplish this so I'm just looking for a pointer in the right direction.



Additionally, the code I have been developing is in Python so I would like to stick to that environment.










share|improve this question

























  • Do you have the grid already? QGIS has 'gui' tools for this...

    – DPSSpatial
    6 hours ago











  • Usually the polygon is overlaid with the fishnet (vector) or grid (raster). If you just have a centroid, the fishnet can be virtual, with the resulting polygons generated on the fly. The complicating factor is the definition of centroid which varies by meaning.

    – Vince
    5 hours ago
















0












0








0








I have an interesting problem and I'm not sure how to approach it.



I am a newcomer to the GIS world so I'm not 100% confident with the terminology, but I am trying to overlay a grid (fishnet/raster?) over top of a set centroids that I have calculated from the polygons in a given shapefile.



Such that each space in the grid contains exactly one centroid.



I'm not sure if there are any standard methods or theories to accomplish this so I'm just looking for a pointer in the right direction.



Additionally, the code I have been developing is in Python so I would like to stick to that environment.










share|improve this question
















I have an interesting problem and I'm not sure how to approach it.



I am a newcomer to the GIS world so I'm not 100% confident with the terminology, but I am trying to overlay a grid (fishnet/raster?) over top of a set centroids that I have calculated from the polygons in a given shapefile.



Such that each space in the grid contains exactly one centroid.



I'm not sure if there are any standard methods or theories to accomplish this so I'm just looking for a pointer in the right direction.



Additionally, the code I have been developing is in Python so I would like to stick to that environment.







python raster vector-grid centroids






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 mins ago









Vince

14.7k32749




14.7k32749










asked 7 hours ago









jdv12jdv12

11




11













  • Do you have the grid already? QGIS has 'gui' tools for this...

    – DPSSpatial
    6 hours ago











  • Usually the polygon is overlaid with the fishnet (vector) or grid (raster). If you just have a centroid, the fishnet can be virtual, with the resulting polygons generated on the fly. The complicating factor is the definition of centroid which varies by meaning.

    – Vince
    5 hours ago





















  • Do you have the grid already? QGIS has 'gui' tools for this...

    – DPSSpatial
    6 hours ago











  • Usually the polygon is overlaid with the fishnet (vector) or grid (raster). If you just have a centroid, the fishnet can be virtual, with the resulting polygons generated on the fly. The complicating factor is the definition of centroid which varies by meaning.

    – Vince
    5 hours ago



















Do you have the grid already? QGIS has 'gui' tools for this...

– DPSSpatial
6 hours ago





Do you have the grid already? QGIS has 'gui' tools for this...

– DPSSpatial
6 hours ago













Usually the polygon is overlaid with the fishnet (vector) or grid (raster). If you just have a centroid, the fishnet can be virtual, with the resulting polygons generated on the fly. The complicating factor is the definition of centroid which varies by meaning.

– Vince
5 hours ago







Usually the polygon is overlaid with the fishnet (vector) or grid (raster). If you just have a centroid, the fishnet can be virtual, with the resulting polygons generated on the fly. The complicating factor is the definition of centroid which varies by meaning.

– Vince
5 hours ago












1 Answer
1






active

oldest

votes


















0














If you use a cell size whose diagonal is smaller than the minimum distance among all pairs of points, no more than one point per cell should happen automatically.



You can find the minimum distance by using (the equivalent of ESRI's) Near tool. Then just do the algebra to get the dimensions of the fishnet grid cells or raster cellsize:



cell_side_length = mindist/sqrt(2)






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "79"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316411%2ffishnet-overlaid-on-shapefile-centroids-with-python%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    If you use a cell size whose diagonal is smaller than the minimum distance among all pairs of points, no more than one point per cell should happen automatically.



    You can find the minimum distance by using (the equivalent of ESRI's) Near tool. Then just do the algebra to get the dimensions of the fishnet grid cells or raster cellsize:



    cell_side_length = mindist/sqrt(2)






    share|improve this answer






























      0














      If you use a cell size whose diagonal is smaller than the minimum distance among all pairs of points, no more than one point per cell should happen automatically.



      You can find the minimum distance by using (the equivalent of ESRI's) Near tool. Then just do the algebra to get the dimensions of the fishnet grid cells or raster cellsize:



      cell_side_length = mindist/sqrt(2)






      share|improve this answer




























        0












        0








        0







        If you use a cell size whose diagonal is smaller than the minimum distance among all pairs of points, no more than one point per cell should happen automatically.



        You can find the minimum distance by using (the equivalent of ESRI's) Near tool. Then just do the algebra to get the dimensions of the fishnet grid cells or raster cellsize:



        cell_side_length = mindist/sqrt(2)






        share|improve this answer















        If you use a cell size whose diagonal is smaller than the minimum distance among all pairs of points, no more than one point per cell should happen automatically.



        You can find the minimum distance by using (the equivalent of ESRI's) Near tool. Then just do the algebra to get the dimensions of the fishnet grid cells or raster cellsize:



        cell_side_length = mindist/sqrt(2)







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 5 hours ago

























        answered 6 hours ago









        J KellyJ Kelly

        914518




        914518






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316411%2ffishnet-overlaid-on-shapefile-centroids-with-python%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Щит и меч (фильм) Содержание Названия серий | Сюжет |...

            Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

            Meter-Bus Содержание Параметры шины | Стандартизация |...